从Play商店安装后,Ionic App崩溃(仅)

时间:2019-05-20 10:17:27

标签: android ionic-framework ionic3 google-play-services

我的应用程序在仿真器中甚至在由android studio安装的用于调试目的的真实设备中都运行良好,但是如果是首次从Play商店安装并启动应用程序,则会崩溃。

我从Play商店崩溃报告中得到了以下错误:

java.lang.NoClassDefFoundError :
  at com.google.android.gms.internal.zzami.zzaf (Unknown Source)
  at com.google.android.gms.analytics.CampaignTrackingReceiver.onReceive (Unknown Source)
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3575)
  at android.app.ActivityThread.access $ 1300 (ActivityThread.java:235)
  at android.app.ActivityThread $ H.handleMessage (ActivityThread.java:1779)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:214)
  at android.app.ActivityThread.main (ActivityThread.java:6981)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit $ MethodAndArgsCaller.run (RuntimeInit.java:493)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1445)
Caused by: java.lang.ClassNotFoundException :
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:134)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:312)

从Play商店下载手机后,将手机连接到android studio时,这是日志记录器:

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbo;
    at com.google.android.gms.internal.zzami.zzaf(Unknown Source)
    at com.google.android.gms.analytics.CampaignTrackingReceiver.onReceive(Unknown Source)
    at android.app.ActivityThread.handleReceiver(ActivityThread.java:3098)
    at android.app.ActivityThread.-wrap18(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1609)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:163)
    at android.app.ActivityThread.main(ActivityThread.java:6238)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
 Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbo" on path: DexPathList[[zip file "/data/app/packageName-1/base.apk"],nativeLibraryDirectories=[/data/app/com.packageName-1/lib/arm64, /data/app/packageName-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    at com.google.android.gms.internal.zzami.zzaf(Unknown Source) 
    at com.google.android.gms.analytics.CampaignTrackingReceiver.onReceive(Unknown Source) 
    at android.app.ActivityThread.handleReceiver(ActivityThread.java:3098) 
    at android.app.ActivityThread.-wrap18(ActivityThread.java) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1609) 
    at android.os.Handler.dispatchMessage(Handler.java:102) 
    at android.os.Looper.loop(Looper.java:163) 
    at android.app.ActivityThread.main(ActivityThread.java:6238) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)  

我不知道此错误来自何处,因为我尝试检查自己的build.gradle文件,但未在其中找到任何错误。下面是使用的build.gradle:

  buildscript {
        repositories {
            mavenCentral()
            maven {
                url "https://maven.google.com"
            }
            jcenter()
            google()
        }

        dependencies {
    implementation fileTree(dir: 'libs', include: '*.jar')
    // SUB-PROJECT DEPENDENCIES START
    implementation(project(path: ":CordovaLib"))
    compile "com.squareup.okhttp3:okhttp-urlconnection:3.10.0"
    compile "com.android.support:support-v4:24.1.1+"
    compile "com.android.support:support-v4:25.+"
    compile "com.android.support:appcompat-v7:25.+"
    compile "com.google.android.gms:play-services-analytics:11.0.1"
    compile "com.google.android.gms:play-services-maps:15.0.1"
    compile "com.google.android.gms:play-services-location:15.0.1"
    compile "com.android.support:support-core-utils:26.1.0"
    compile "com.android.support:support-annotations:27.+"
    compile "com.google.android.gms:play-services-location:15.+"
    compile "com.android.support:appcompat-v7:23+"
    compile "com.android.support:support-v4:26.+"
    compile "com.android.support:appcompat-v7:26.+"
    compile "com.facebook.android:facebook-android-sdk:4.40.0"
    compile "com.google.android.gms:play-services-auth:+"
    compile "com.google.android.gms:play-services-identity:+"
    // SUB-PROJECT DEPENDENCIES END
       }
    }

有人可以帮我吗?

0 个答案:

没有答案