无法让提供者不在模拟器上

时间:2017-05-23 15:19:43

标签: android

所以..我创建了我的应用程序,我想检查它在手机上的样子,但是我收到了错误(它显示在最后)。我尝试了互联网上的一切,让我的手机上运行应用程序。一切都在PC和模拟器上工作,但我不知道为什么它不会在我的手机上运行?有什么建议?错误:

java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/com.robertas.parking.bestfreeparking-1/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
 at android.app.ActivityThread.installProvider(ActivityThread.java:5233)
 at android.app.ActivityThread.installContentProviders(ActivityThread.java:4804)
 at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4744)
 at android.app.ActivityThread.access$1500(ActivityThread.java:167)
 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1480)
 at android.os.Handler.dispatchMessage(Handler.java:111)
 at android.os.Looper.loop(Looper.java:194)
 at android.app.ActivityThread.main(ActivityThread.java:5546)
 at java.lang.reflect.Method.invoke(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:372)
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:964)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/com.robertas.parking.bestfreeparking-1/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
 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 android.app.ActivityThread.installProvider(ActivityThread.java:5218)
 ... 11 more
 Suppressed: java.lang.ClassNotFoundException: com.google.firebase.provider.FirebaseInitProvider
  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)
  ... 13 more
 Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

摇篮:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.0"
    defaultConfig {
        useLibrary 'org.apache.http.legacy'
        applicationId "com.robertas.parking.bestfreeparking"
        multiDexEnabled true
        minSdkVersion 17
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.mcxiaoke.volley:library-aar:1.0.0'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.google.android.gms:play-services:10.2.6'
    compile 'com.squareup.picasso:picasso:2.5.2'
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
}

新错误:

java.lang.RuntimeException: Unable to instantiate application android.support.multidex.MultiDexApplication: java.lang.ClassNotFoundException: Didn't find class "android.support.multidex.MultiDexApplication" on path: DexPathList[[zip file "/data/app/com.robertas.parking.bestfreeparking-2/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
 at android.app.LoadedApk.makeApplication(LoadedApk.java:574)
 at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4736)
 at android.app.ActivityThread.access$1500(ActivityThread.java:167)
 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1480)
 at android.os.Handler.dispatchMessage(Handler.java:111)
 at android.os.Looper.loop(Looper.java:194)
 at android.app.ActivityThread.main(ActivityThread.java:5546)
 at java.lang.reflect.Method.invoke(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:372)
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:964)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.multidex.MultiDexApplication" on path: DexPathList[[zip file "/data/app/com.robertas.parking.bestfreeparking-2/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
 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 android.app.Instrumentation.newApplication(Instrumentation.java:984)
 at android.app.LoadedApk.makeApplication(LoadedApk.java:569)
 ... 10 more
 Suppressed: java.lang.ClassNotFoundException: android.support.multidex.MultiDexApplication
  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)
  ... 13 more
 Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

0 个答案:

没有答案