SDK: flotter
Nous utilisons Flutter avec la messagerie en Firebase dans notre application. En plus de cela, nous utilisons plaine_notification_token pour obtenir le jeton FCM pour Android et jeton APNS pour iOS. Obtenir cette erreur lors de la mise à niveau de la graderie à 4.2.2.
numéro
E/AndroidRuntime(27480): at net.kikuchy.plain_notification_token.PlainNotificationTokenPlugin.onMethodCall(PlainNotificationTokenPlugin.Java:47)
E/AndroidRuntime(27480): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.Java:233)
E/AndroidRuntime(27480): at io.flutter.embedding.engine.Dart.DartMessenger.handleMessageFromDart(DartMessenger.Java:85)
E/AndroidRuntime(27480): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.Java:818)
E/AndroidRuntime(27480): at Android.os.MessageQueue.nativePollOnce(Native Method)
E/AndroidRuntime(27480): at Android.os.MessageQueue.next(MessageQueue.Java:335)
E/AndroidRuntime(27480): at Android.os.Looper.loop(Looper.Java:183)
E/AndroidRuntime(27480): at Android.app.ActivityThread.main(ActivityThread.Java:8010)
E/AndroidRuntime(27480): at Java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(27480): at com.Android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.Java:631)
E/AndroidRuntime(27480): at com.Android.internal.os.ZygoteInit.main(ZygoteInit.Java:978)
E/AndroidRuntime(27480): Caused by: Java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceId" on path: DexPathList[[Zip file "/data/app/~~5gcFVfnQoOUOHN3V15pnZA==/money.bullet.internal-fy-pjwoLC9rHFRqMpeWWJw==/base.apk"],nativeLibraryDirectories=[/data/app/~~5gcFVfnQoOUOHN3V15pnZA==/money.bullet.internal-fy-pjwoLC9rHFRqMpeWWJw==/lib/arm64, /data/app/~~5gcFVfnQoOUOHN3V15pnZA==/money.bullet.internal-fy-pjwoLC9rHFRqMpeWWJw==/base.apk!/lib/arm64-v8a, /system/lib64, /system/system_ext/lib64]]
E/AndroidRuntime(27480): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.Java:207)
E/AndroidRuntime(27480): at Java.lang.ClassLoader.loadClass(ClassLoader.Java:379)
E/AndroidRuntime(27480): at Java.lang.ClassLoader.loadClass(ClassLoader.Java:312)
E/AndroidRuntime(27480): ... 11 more
I/Process (27480): Sending signal. PID: 27480 SIG: 9
Lost connection to device.
Android/App/Build.Gradle
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'androidx.core:core:1.6.0'
implementation 'androidx.fragment:fragment:1.3.5'
implementation "com.clevertap.Android:clevertap-Android-sdk:4.1.1"
implementation 'com.google.Android.play:core:1.10.0'
implementation 'com.google.Android.gms:play-services-basement:17.6.0'
//MANDATORY for App Inbox
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.viewpager:viewpager:1.0.0'
implementation 'com.google.Android.material:material:1.4.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
//For CleverTap Android SDK v3.6.4 and above add the following -
implementation 'com.Android.installreferrer:installreferrer:2.2'
//Optional ExoPlayer Libraries for Audio/Video Inbox Messages. Audio/Video messages will be dropped without these dependencies
implementation 'com.google.Android.exoplayer:exoplayer:2.14.1'
implementation 'com.google.Android.exoplayer:exoplayer-hls:2.14.1'
implementation 'com.google.Android.exoplayer:exoplayer-ui:2.14.1'
implementation 'com.google.firebase:firebase-messaging:22.0.0'
// For bureau-sdk to get the advertising-id
implementation 'com.google.Android.gms:play-services-ads-identifier:17.0.1'
// implementation 'com.google.firebase:firebase-iid'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.firebase.firebase-perf'
googleServices { disableVersionCheck = true }
Ceci est le fichier Build.Gradle où après la mise à jour de la version des grades à 4.2.2 de 3.x, le problème a commencé à monter dans le projet de flutter. Je suis capable de compiler l'application mais l'application se bloque à l'exécution.
Build.Gradle
buildscript {
ext.kotlin_version = '1.5.20'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.Android.tools.build:gradle:4.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.8'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
classpath 'com.google.firebase:perf-plugin:1.4.0'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
configurations.all {
resolutionStrategy {
forcedModules = [
"com.google.Android.gms:play-services-vision-common:19.0.2",
]
}
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Ajouter
implementation 'com.google.firebase:firebase-iid'
à votre Android/App/Build.Gradle et cela devrait résoudre le problème.