B4X:
Dim nb As NotificationBuilder
nb.initialize
nb.SmallIcon="icon"
nb.ContentTitle=title
nb.ContentText=Data
nb.DefaultLight=True
nb.DefaultSound=True
nb.DefaultVibrate=True
nb.ContentInfo=""
nb.subtext=""
nb.setcustomlight (Main.a100color,500,500)
nb.setActivity(Main)
nb.Notify(1)
' error in line above
{/Code]
** Service (pushservice) Start **
java.lang.RuntimeException: Unable to start service FB.Tag.pushservice@47ce1f7 with Intent { cmp=FB.Tag/.pushservice (has extras) }: java.lang.RuntimeException: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/app/NotificationManagerCompat;
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3060)
at android.app.ActivityThread.access$2100(ActivityThread.java:162)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1510)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:189)
at android.app.ActivityThread.main(ActivityThread.java:5532)
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:950)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745)
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/app/NotificationManagerCompat;
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:148)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
at FB.Tag.pushservice.handleStart(pushservice.java:71)
at FB.Tag.pushservice.onStartCommand(pushservice.java:55)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3043)
... 9 more
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/app/NotificationManagerCompat;
at barxdroid.NotificationBuilder.NotificationBuilder.Notify(NotificationBuilder.java:512)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:680)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:308)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
... 13 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.app.NotificationManagerCompat" on path: DexPathList[[zip file "/data/app/FB.Tag-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
... 22 more
Suppressed: java.lang.ClassNotFoundException: android.support.v4.app.NotificationManagerCompat
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 23 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
This code has already worked!
Only change:
I followed Erels Instructions here, [URL='https://www.b4x.com/android/forum/threads/owner-accounts-with-all-field.41101/#post-246786']https://www.b4x.com/android/forum/threads/owner-accounts-with-all-field.41101/#post-246786, added the permission READ_PROFILE and the library ContentResolver.[/URL]
Thank you!
[URL='https://www.b4x.com/android/forum/threads/owner-accounts-with-all-field.41101/#post-246786']
[/URL]
Last edited: