应用程序崩溃且无法在模拟器和设备中打开怎么办?

时间:2018-08-13 10:15:22

标签: java android

当我尝试打开它不起作用时,请有人帮我解决这个问题。 这是发生的错误

 08-13 15:30:27.244 4272-4272/com.example.ambient.androidtodofirebase E/AndroidRuntime: FATAL EXCEPTION: main
        Process: com.example.ambient.androidtodofirebase, PID: 4272
        java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbp;
            at com.google.firebase.firestore.FirebaseFirestore.zze(Unknown Source)
            at com.google.firebase.firestore.FirebaseFirestore.getInstance(Unknown Source)
            at com.example.ambient.androidtodofirebase.MainActivity.onCreate(MainActivity.java:60)
            at android.app.Activity.performCreate(Activity.java:6237)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
            at android.app.ActivityThread.-wrap11(ActivityThread.java)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:148)
            at android.app.ActivityThread.main(ActivityThread.java:5417)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
         Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbp" on path: DexPathList[[zip file "/data/app/com.example.ambient.androidtodofirebase-2/base.apk", zip file "/data/app/com.example.ambient.androidtodofirebase-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.ambient.androidtodofirebase-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.ambient.androidtodofirebase-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.ambient.androidtodofirebase-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.ambient.androidtodofirebase-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.ambient.androidtodofirebase-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.ambient.androidtodofirebase-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.ambient.androidtodofirebase-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.ambient.androidtodofirebase-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.ambient.androidtodofirebase-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.ambient.androidtodofirebase-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.ambient.androidtodofirebase-2/lib/x86, /vendor/lib, /system/lib]]
            at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
            at com.google.firebase.firestore.FirebaseFirestore.zze(Unknown Source) 
            at com.google.firebase.firestore.FirebaseFirestore.getInstance(Unknown Source) 
            at com.example.ambient.androidtodofirebase.MainActivity.onCreate(MainActivity.java:60) 
            at android.app.Activity.performCreate(Activity.java:6237) 
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) 
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) 
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
            at android.app.ActivityThread.-wrap11(ActivityThread.java) 
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
            at android.os.Handler.dispatchMessage(Handler.java:102) 
            at android.os.Looper.loop(Looper.java:148) 
            at android.app.ActivityThread.main(ActivityThread.java:5417) 
            at java.lang.reflect.Method.invoke(Native Method) 
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
            Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.common.internal.zzbp
            at java.lang.Class.classForName(Native Method)
            at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
            at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
                    ... 16 more
         Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

清单

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.ambient.androidtodofirebase"
    xmlns:tools="http://schemas.android.com/tools">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>


</manifest>

0 个答案:

没有答案