Einzelnen Beitrag anzeigen

michaelg

Registriert seit: 20. Apr 2008
87 Beiträge
 
#1

FMX-Android App Firebase Cloud Messaging unter Delphi 11

  Alt 18. Jan 2022, 10:28
Moinsen,

in einer App unter 10.4.2 kann ich Pushnachrichten per Firebase Cloud Messaging empfangen. Mein Problem dreht sich zunächst mal um Android32 und Android64 unter Delphi 11.
Ich habe dieselbe App unter Delphi 11 compiliert und auf meinem Android-Tablet installiert. Das Programm beendet sich sofort. Der Android-Monitor sagt mir folgendes, aber mir sagt das gerade nicht viel. Könnt Ihr helfen?

Code:
01-17 10:50:12.154: W/ComponentDiscovery(18033): Class com.google.firebase.installations.FirebaseInstallationsRegistrar is not an found.
01-17 10:50:12.154: W/ComponentDiscovery(18033): java.lang.ClassNotFoundException: com.google.firebase.installations.FirebaseInstallationsRegistrar
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at java.lang.Class.classForName(Native Method)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at java.lang.Class.forName(Class.java:453)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at java.lang.Class.forName(Class.java:378)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common@@16.1.0:78)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common@@16.1.0:71)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.1.0:543)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:365)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:332)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at com.embarcadero.firebase.provider.FirebaseInitProvider.onCreate(FirebaseInitProvider.java:67)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at android.content.ContentProvider.attachInfo(ContentProvider.java:1925)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at android.content.ContentProvider.attachInfo(ContentProvider.java:1900)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at com.embarcadero.firebase.provider.FirebaseInitProvider.attachInfo(FirebaseInitProvider.java:57)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at android.app.ActivityThread.installProvider(ActivityThread.java:6618)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at android.app.ActivityThread.installContentProviders(ActivityThread.java:6173)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6079)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at android.app.ActivityThread.-wrap1(Unknown Source:0)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1791)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at android.os.Handler.dispatchMessage(Handler.java:106)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at android.os.Looper.loop(Looper.java:164)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at android.app.ActivityThread.main(ActivityThread.java:7002)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at java.lang.reflect.Method.invoke(Native Method)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
01-17 10:50:12.154: W/ComponentDiscovery(18033): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.installations.FirebaseInstallationsRegistrar" on path: DexPathList[[zip file "/data/app/com.projektsoftware.ProjektApp-_VOYUL39KHT4FR1oNRNYLQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.projektsoftware.ProjektApp-_VOYUL39KHT4FR1oNRNYLQ==/lib/arm, /data/app/com.projektsoftware.ProjektApp-_VOYUL39KHT4FR1oNRNYLQ==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
01-17 10:50:12.154: W/ComponentDiscovery(18033):    ... 23 more
01-17 10:50:12.162: W/ComponentDiscovery(18033): Class com.google.firebase.datatransport.TransportRegistrar is not an found.
01-17 10:50:12.162: W/ComponentDiscovery(18033): java.lang.ClassNotFoundException: com.google.firebase.datatransport.TransportRegistrar
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at java.lang.Class.classForName(Native Method)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at java.lang.Class.forName(Class.java:453)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at java.lang.Class.forName(Class.java:378)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common@@16.1.0:78)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common@@16.1.0:71)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.1.0:543)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:365)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:332)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at com.embarcadero.firebase.provider.FirebaseInitProvider.onCreate(FirebaseInitProvider.java:67)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at android.content.ContentProvider.attachInfo(ContentProvider.java:1925)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at android.content.ContentProvider.attachInfo(ContentProvider.java:1900)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at com.embarcadero.firebase.provider.FirebaseInitProvider.attachInfo(FirebaseInitProvider.java:57)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at android.app.ActivityThread.installProvider(ActivityThread.java:6618)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at android.app.ActivityThread.installContentProviders(ActivityThread.java:6173)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6079)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at android.app.ActivityThread.-wrap1(Unknown Source:0)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1791)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at android.os.Handler.dispatchMessage(Handler.java:106)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at android.os.Looper.loop(Looper.java:164)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at android.app.ActivityThread.main(ActivityThread.java:7002)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at java.lang.reflect.Method.invoke(Native Method)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
01-17 10:50:12.162: W/ComponentDiscovery(18033): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.datatransport.TransportRegistrar" on path: DexPathList[[zip file "/data/app/com.projektsoftware.ProjektApp-_VOYUL39KHT4FR1oNRNYLQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.projektsoftware.ProjektApp-_VOYUL39KHT4FR1oNRNYLQ==/lib/arm, /data/app/com.projektsoftware.ProjektApp-_VOYUL39KHT4FR1oNRNYLQ==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
01-17 10:50:12.162: W/ComponentDiscovery(18033):    ... 23 more
01-17 10:50:12.171: W/ComponentDiscovery(18033): Class com.google.firebase.messaging.FirebaseMessagingRegistrar is not an found.
01-17 10:50:12.171: W/ComponentDiscovery(18033): java.lang.ClassNotFoundException: com.google.firebase.messaging.FirebaseMessagingRegistrar
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at java.lang.Class.classForName(Native Method)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at java.lang.Class.forName(Class.java:453)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at java.lang.Class.forName(Class.java:378)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common@@16.1.0:78)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common@@16.1.0:71)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.1.0:543)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:365)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:332)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at com.embarcadero.firebase.provider.FirebaseInitProvider.onCreate(FirebaseInitProvider.java:67)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at android.content.ContentProvider.attachInfo(ContentProvider.java:1925)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at android.content.ContentProvider.attachInfo(ContentProvider.java:1900)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at com.embarcadero.firebase.provider.FirebaseInitProvider.attachInfo(FirebaseInitProvider.java:57)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at android.app.ActivityThread.installProvider(ActivityThread.java:6618)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at android.app.ActivityThread.installContentProviders(ActivityThread.java:6173)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6079)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at android.app.ActivityThread.-wrap1(Unknown Source:0)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1791)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at android.os.Handler.dispatchMessage(Handler.java:106)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at android.os.Looper.loop(Looper.java:164)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at android.app.ActivityThread.main(ActivityThread.java:7002)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at java.lang.reflect.Method.invoke(Native Method)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
01-17 10:50:12.171: W/ComponentDiscovery(18033): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.messaging.FirebaseMessagingRegistrar" on path: DexPathList[[zip file "/data/app/com.projektsoftware.ProjektApp-_VOYUL39KHT4FR1oNRNYLQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.projektsoftware.ProjektApp-_VOYUL39KHT4FR1oNRNYLQ==/lib/arm, /data/app/com.projektsoftware.ProjektApp-_VOYUL39KHT4FR1oNRNYLQ==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
01-17 10:50:12.171: W/ComponentDiscovery(18033):    ... 23 more
01-17 10:50:12.197: E/AndroidRuntime(18033): FATAL EXCEPTION: main
01-17 10:50:12.197: E/AndroidRuntime(18033): Process: com.projektsoftware.ProjektApp, PID: 18033
01-17 10:50:12.197: E/AndroidRuntime(18033): java.lang.RuntimeException: Unable to get provider androidx.core.content.FileProvider: java.lang.ClassNotFoundException: Didn't find class "androidx.core.content.FileProvider" on path: DexPathList[[zip file "/data/app/com.projektsoftware.ProjektApp-_VOYUL39KHT4FR1oNRNYLQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.projektsoftware.ProjektApp-_VOYUL39KHT4FR1oNRNYLQ==/lib/arm, /data/app/com.projektsoftware.ProjektApp-_VOYUL39KHT4FR1oNRNYLQ==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
01-17 10:50:12.197: E/AndroidRuntime(18033):    at android.app.ActivityThread.installProvider(ActivityThread.java:6621)
01-17 10:50:12.197: E/AndroidRuntime(18033):    at android.app.ActivityThread.installContentProviders(ActivityThread.java:6173)
01-17 10:50:12.197: E/AndroidRuntime(18033):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6079)
01-17 10:50:12.197: E/AndroidRuntime(18033):    at android.app.ActivityThread.-wrap1(Unknown Source:0)
01-17 10:50:12.197: E/AndroidRuntime(18033):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1791)
01-17 10:50:12.197: E/AndroidRuntime(18033):    at android.os.Handler.dispatchMessage(Handler.java:106)
01-17 10:50:12.197: E/AndroidRuntime(18033):    at android.os.Looper.loop(Looper.java:164)
01-17 10:50:12.197: E/AndroidRuntime(18033):    at android.app.ActivityThread.main(ActivityThread.java:7002)
01-17 10:50:12.197: E/AndroidRuntime(18033):    at java.lang.reflect.Method.invoke(Native Method)
01-17 10:50:12.197: E/AndroidRuntime(18033):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
01-17 10:50:12.197: E/AndroidRuntime(18033):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
01-17 10:50:12.197: E/AndroidRuntime(18033): Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.core.content.FileProvider" on path: DexPathList[[zip file "/data/app/com.projektsoftware.ProjektApp-_VOYUL39KHT4FR1oNRNYLQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.projektsoftware.ProjektApp-_VOYUL39KHT4FR1oNRNYLQ==/lib/arm, /data/app/com.projektsoftware.ProjektApp-_VOYUL39KHT4FR1oNRNYLQ==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
01-17 10:50:12.197: E/AndroidRuntime(18033):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
01-17 10:50:12.197: E/AndroidRuntime(18033):    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
01-17 10:50:12.197: E/AndroidRuntime(18033):    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
01-17 10:50:12.197: E/AndroidRuntime(18033):    at android.app.ActivityThread.installProvider(ActivityThread.java:6606)
01-17 10:50:12.197: E/AndroidRuntime(18033):    ... 10 more
Ich hab alle zusätzlichen Bibliotheksdateien genauso übernommen, wie sie in der 10.4.2er drin waren (google-services, dex- und jar-Dateien).




Android-SDK ist 26.1.1 mit Ziel Android-30. MinSDKVersion ist im Manifest 23 und MaxSDKVersion dann 30.

Wie gesagt, unter Delphi 10.4.2 läuft das sauber, auch mit 26.1.1. Was mache ich falsch? Manifest-Template usw. habe ich auch schon mal neu erstellen lassen usw. .


Ich frage mich außerdem, warum in der neuen Delphi-Version immer noch 25.2.5 mitgeliefert wird...


Grüße
Michael
Miniaturansicht angehängter Grafiken
bibliothekenandroid32.png  
  Mit Zitat antworten Zitat