Android Question please help i have problem in Manifest

Status
Not open for further replies.

naifnas

Active Member
Licensed User
hi all
i try nbdemo
but show problem this

B4A Version: 7.30
Parsing code. (0.01s)
Compiling code. (0.13s)
Compiling layouts code. (0.03s)
Organizing libraries. (0.04s)
Generating R file. Error
AndroidManifest.xml:30: error: No resource identifier found for attribute 'parentActivityName' in package 'android'
-----------------------------------------
this Manifest
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="17"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)

SetActivityAttribute(NotePopup, androidarentActivityName, ".NoteParent")
SetActivityAttribute(NotePopup, android:launchMode, "standard")
AddActivityText(NotePopup,<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".NoteParent"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
-------------------------------------------
please any help me?
thanks
 

naifnas

Active Member
Licensed User
thanks Erel
B4X:
#Region  Project Attributes
    #ApplicationLabel: B4A Example
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    
    Dim nb As NotificationBuilder

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private Panel1 As Panel
    Private Button1 As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)

    Activity.LoadLayout("1")
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub



Sub Button1_Click
    nb.Initialize
    nb.SmallIcon = "icon"
    nb.Ticker = "test app"
    nb.Tag="some tag"
    nb.setActivity(Me)
    nb.DefaultLight=True
    nb.DefaultVibrate=True
    nb.DefaultSound=True
    nb.ContentTitle="aaa"
    nb.ContentText="aaaa"
    nb.ContentInfo="aaaaaa"
    nb.SubText="ss"
    nb.Notify(1)
End Sub

this error
B4X:
Logger connected to:  HUAWEI HUAWEI LUA-U22
--------- beginning of main
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
java.lang.NoSuchMethodError: No virtual method setSubText(Ljava/lang/CharSequence;)Landroid/support/v4/app/NotificationCompat$Builder; in class Landroid/support/v4/app/NotificationCompat$Builder; or its super classes (declaration of 'android.support.v4.app.NotificationCompat$Builder' appears in /data/app/test.com-2/base.apk)
    at barxdroid.NotificationBuilder.NotificationBuilder.setSubText(NotificationBuilder.java:295)
    at test.com.main._button1_click(main.java:439)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
    at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
    at android.view.View.performClick(View.java:4848)
    at android.view.View$PerformClick.run(View.java:20270)
    at android.os.Handler.handleCallback(Handler.java:815)
    at android.os.Handler.dispatchMessage(Handler.java:104)
    at android.os.Looper.loop(Looper.java:194)
    at android.app.ActivityThread.main(ActivityThread.java:5660)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)
 

Attachments

  • path.png
    282.1 KB · Views: 154
  • path1.png
    153.3 KB · Views: 165
  • path2.png
    185.4 KB · Views: 151
  • path3.png
    164.6 KB · Views: 164
  • path4.png
    195.8 KB · Views: 151
Upvote 0

naifnas

Active Member
Licensed User
thanks
but
when I Add this line to the project:
B4X:
#additionaljar: com.android.support:support-v4

when I used googlemap have this error
B4X:
B4A Version: 7.30
Parsing code.    (0.08s)
Compiling code.    (0.39s)
Compiling layouts code.    (0.04s)
Organizing libraries.    (0.00s)
Generating R file.    (0.08s)
Compiling debugger engine code.    (1.91s)
Compiling generated Java code.    Error
B4A line: 4320
gmap.AnimateCamera(cpr)
javac 1.8.0_144
src\com\example\android\mapexample\main.java:7252: error: package com.google.android.gms.maps.model does not exist
mostCurrent._gmap.AnimateCamera((com.google.android.gms.maps.model.CameraPosition)(_cpr.getObject()));
                                                                  ^

B4X:
    Dim cpr As CameraPosition
    cpr.Initialize(latlon.Latitude, latlon.Longitude,  12) ' Use own location LAT LON
    gmap.AnimateCamera(cpr)
            gmap.MyLocationEnabled=True
 
Upvote 0
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…