如何在开始时停止崩溃我的应用程序

时间:2019-09-30 11:24:51

标签: flutter flutter-dependencies

打开应用程序时,我的应用程序崩溃了。我已将Flutter版本升级到最新的1.9.1。

我的崩溃日志:

  

java.lang.NoClassDefFoundError:无法解决以下问题:   Lcom / google / android / gms / common / internal / LibraryVersion;           com.google.firebase.iid.zzl.zza(com.google.firebase:firebase-iid @@ 20.0.0:47)           在com.google.firebase.iid.zzl.zza(com.google.firebase:firebase-iid @@ 20.0.0:13)           在com.google.firebase.iid.FirebaseInstanceId.zza(com.google.firebase:firebase-iid @@ 20.0.0:136)           在com.google.firebase.iid.zzj.zza(未知来源:8)           com.google.firebase.iid.zzan.zza(com.google.firebase:firebase-iid @@ 20.0.0:14)           com.google.firebase.iid.FirebaseInstanceId.zza(com.google.firebase:firebase-iid @@ 20.0.0:135)           在com.google.firebase.iid.zzg.then(未知来源:6)           位于com.google.android.gms.tasks.zzf.run(未知来源:8)           在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)           在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:636)           在java.lang.Thread.run(Thread.java:764)

     

原因:java.lang.ClassNotFoundException:在路径上找不到类“ com.google.android.gms.common.internal.LibraryVersion”   DexPathList [[zip文件   “ /data/app/com.example.communityapp-MvPXsps5u6N_ZqElCQb4zw==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.communityapp-MvPXsps5u6N_ZqElCQb4zw==/lib/arm64,   /data/app/com.example.communityapp-MvPXsps5u6N_ZqElCQb4zw==/base.apk!/lib/arm64-v8a,   / system / lib64,/ system / vendor / lib64]]

1 个答案:

答案 0 :(得分:0)

检查您的Android> App > build.gradle file

检查是否缺少defaultConfig中的字符串

defaultConfig {
 multiDexEnabled true
 ndk {
      abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'arm64-v8a'
     }
}

然后运行flutter clean,然后尝试重新安装该应用程序