Android Question problem firebase messaging with b4a 12.20

fifiddu70

Well-Known Member
Licensed User
Longtime User
hello i have this error in my app: i try sotitute firebase service with firebase receiver but the problem is only present.
 

Attachments

  • kkk.jpg
    435.9 KB · Views: 127

fifiddu70

Well-Known Member
Licensed User
Longtime User
Logger connesso a: OPPO CPH2197
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
** Activity (main) Resume **
*** Receiver (firebasemessaging) Receive (first time) ***
firebasemessaging_receiver_receive (java line: 90)
java.lang.NoSuchMethodError: No virtual method getToken()Lcom/google/android/gms/tasks/Task; in class Lcom/google/firebase/messaging/FirebaseMessaging; or its super classes (declaration of 'com.google.firebase.messaging.FirebaseMessaging' appears in base.apk)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.updateToken(FirebaseNotificationsService.java:117)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.Initialize(FirebaseNotificationsService.java:114)
at com.partannasoftware.scherzo.firebasemessaging._receiver_receive(firebasemessaging.java:90)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at com.partannasoftware.scherzo.firebasemessaging.onReceive(firebasemessaging.java:42)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:4545)
at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:240)
at android.os.Looper.loop(Looper.java:351)
at android.app.ActivityThread.main(ActivityThread.java:8355)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
firebasemessaging_receiver_receive (java line: 90)
java.lang.NoSuchMethodError: No virtual method getToken()Lcom/google/android/gms/tasks/Task; in class Lcom/google/firebase/messaging/FirebaseMessaging; or its super classes (declaration of 'com.google.firebase.messaging.FirebaseMessaging' appears in base.apk)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.updateToken(FirebaseNotificationsService.java:117)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.Initialize(FirebaseNotificationsService.java:114)
at com.partannasoftware.scherzo.firebasemessaging._receiver_receive(firebasemessaging.java:90)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at com.partannasoftware.scherzo.firebasemessaging.onReceive(firebasemessaging.java:42)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:4545)
at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:240)
at android.os.Looper.loop(Looper.java:351)
at android.app.ActivityThread.main(ActivityThread.java:8355)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
 
Upvote 0

fifiddu70

Well-Known Member
Licensed User
Longtime User
Ricerca librerie che necessitano di essere "dexed". (0.02s)
Dex code (6.74s)
Dex merge Error
Error: Cannot fit requested classes in a single dex file (# methods: 66600 > 65536). Try supplying a main-dex list
Compilation failed
Exception in thread "main" java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, position: null
at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:98)
at com.android.tools.r8.D8.main(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:4)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, position: null
at Version.fakeStackEntry(Version_3.3.20-dev+aosp1.java:0)
at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:75)
at com.android.tools.r8.internal.vj.a(R8_3.
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
Put into your main

#MultiDex: true
 
Upvote 0

fifiddu70

Well-Known Member
Licensed User
Longtime User
Ok Alex_197, i try toput #MultiDex: True, now load the app in to smartphone, when open i have this error:
Logger connesso a: OPPO CPH2197
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
main_activity_create (java line: 1895)
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/InterstitialAd;
at mobi.mindware.admob.interstitial.AdmobInterstitialsAds.Initialize(AdmobInterstitialsAds.java:48)
at com.partannasoftware.scherzo.main._activity_create(main.java:1895)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
at com.partannasoftware.scherzo.main.afterFirstLayout(main.java:105)
at com.partannasoftware.scherzo.main.access$000(main.java:17)
at com.partannasoftware.scherzo.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:240)
at android.os.Looper.loop(Looper.java:351)
at android.app.ActivityThread.main(ActivityThread.java:8355)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
Caused by: java.lang.ClassNotFoundException: com.google.android.gms.ads.InterstitialAd
... 15 more
main_activity_create (java line: 1895)
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/InterstitialAd;
at mobi.mindware.admob.interstitial.AdmobInterstitialsAds.Initialize(AdmobInterstitialsAds.java:48)
at com.partannasoftware.scherzo.main._activity_create(main.java:1895)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
at com.partannasoftware.scherzo.main.afterFirstLayout(main.java:105)
at com.partannasoftware.scherzo.main.access$000(main.java:17)
at com.partannasoftware.scherzo.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:240)
at android.os.Looper.loop(Looper.java:351)
at android.app.ActivityThread.main(ActivityThread.java:8355)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
Caused by: java.lang.ClassNotFoundException: com.google.android.gms.ads.InterstitialAd
... 15 more
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…