我已经关注了很多教程,试图弄清楚为什么我的应用程序在我尝试运行时仍然崩溃。 我一直收到这个错误。 请有人帮我解决这个问题
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/hushtagstudios.com.towme-BBa4eyXyMhsunbzMgepCFg==/base.apk", zip file "/data/app/hushtagstudios.com.towme-BBa4eyXyMhsunbzMgepCFg==/split_lib_dependencies_apk.apk", zip file "/data/app/hushtagstudios.com.towme-BBa4eyXyMhsunbzMgepCFg==/split_lib_resources_apk.apk", zip file "/data/app/hushtagstudios.com.towme-BBa4eyXyMhsunbzMgepCFg==/split_lib_slice_0_apk.apk", zip file "/data/app/hushtagstudios.com.towme-BBa4eyXyMhsunbzMgepCFg==/split_lib_slice_1_apk.apk", zip file "/data/app/hushtagstudios.com.towme-BBa4eyXyMhsunbzMgepCFg==/split_lib_slice_2_apk.apk", zip file "/data/app/hushtagstudios.com.towme-BBa4eyXyMhsunbzMgepCFg==/split_lib_slice_3_apk.apk", zip file "/data/app/hushtagstudios.com.towme-BBa4eyXyMhsunbzMgepCFg==/split_lib_slice_4_apk.apk", zip file "/data/app/hushtagstudios.com.towme-BBa4eyXyMhsunbzMgepCFg==/split_lib_slice_5_apk.apk", zip file "/data/app/hushtagstudios.com.towme-BBa4eyXyMhsunbzMgepCFg==/split_lib_slice_6_apk.apk", zip file "/data/app/hushtagstudios.com.towme-BBa4eyXyMhsunbzMgepCFg==/split_lib_slice_7_apk.apk", zip file "/data/app/hushtagstudios.com.towme-BBa4eyXyMhsunbzMgepCFg==/split_lib_slice_8_apk.apk", zip file "/data/app/hushtagstudios.com.towme-BBa4eyXyMhsunbzMgepCFg==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/hushtagstudios.com.towme-BBa4eyXyMhsunbzMgepCFg==/lib/x86, /system/lib, /system/vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
04-19 10:42:11.102 16273-16273/hushtagstudios.com.towme E/AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.ActivityThread.installProvider(ActivityThread.java:6273)
... 10 more
Suppressed: java.io.IOException: No original dex files found for dex location /data/app/hushtagstudios.com.towme-BBa4eyXyMhsunbzMgepCFg==/split_lib_resources_apk.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:353)
at dalvik.system.DexFile.<init>(DexFile.java:100)
at dalvik.system.DexFile.<init>(DexFile.java:74)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:374)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:337)
at dalvik.system.DexPathList.<init>(DexPathList.java:157)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:69)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:36)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:676)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:709)
at android.app.LoadedApk.getResources(LoadedApk.java:936)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2242)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5672)
... 8 more
这是我的清单文件
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="hushtagstudios.com.towme">
<supports-screens
android:largeScreens="true"
android:smallScreens="true"
android:normalScreens="true"
android:xlargeScreens="true"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_towme"
android:roundIcon="@mipmap/ic_towme"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:name="android.support.multidex.MultiDexApplication" >
<activity
android:name=".Signin"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Registration"
android:label="@string/title_activity_registration"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".Splash"
android:label="@string/title_activity_sigin"
android:theme="@style/AppTheme.NoActionBar" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_direction_api" />
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".MyAccount"
android:label="@string/title_activity_my_account"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".InviteAFriend"
android:label="@string/title_activity_invite_afriend"
android:theme="@style/AppTheme.NoActionBar" />
<!-- [START firebase_service] -->
<service android:name=".Service.MyFirebaseMessaging">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<!-- [END firebase_service] -->
<!-- [START firebase_iid_service] -->
<service
android:name=".Service.MyFirebaseIdService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<activity
android:name=".History"
android:label="@string/title_activity_history"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".Notifications"
android:label="@string/title_activity_notifications"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".About"
android:label="@string/title_activity_about"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".Help"
android:label="@string/title_activity_help"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".LetUsHelp"
android:label="@string/title_activity_let_us_help"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".DriveWithTowMe"
android:label="@string/title_activity_drive_with_tow_me"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".BuyInsurance"
android:label="@string/title_activity_buy_insurance"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".JumpStart"
android:label="@string/title_activity_jump_start"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".TermsAndConditions"
android:label="@string/title_activity_conditions"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".Accident"
android:label="@string/title_activity_accident"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".InDitch"
android:label="@string/title_activity_in_ditch"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".OutOfFuel"
android:label="@string/title_activity_out_of_fuel"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".MechanicalFault"
android:label="@string/title_activity_mechanical_fault"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".FlatTires"
android:label="@string/title_activity_flat_tires"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".LockedCar"
android:label="@string/title_activity_locked_car"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".InsuranceHistory"
android:label="@string/title_activity_insurance_history"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".InsuranceCalculator"
android:label="@string/title_activity_insurance_calculator"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".NewInsurance"
android:label="@string/title_activity_new_insurance"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".RenewInsurance"
android:label="@string/title_activity_renew_insurance"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".ProposalForm1"
android:label="@string/title_activity_proposal_form"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".InsurancePayment"
android:label="@string/title_activity_insurance_payment"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".InsuranceDelivery"
android:label="@string/title_activity_insurance_delivery"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".SelectMake"
android:label="@string/title_activity_select_model"
android:theme="@style/AppTheme.NoActionBar" />
<activity android:name=".HistorySingleActivity"
/>
<activity android:name=".DeliveryActivity"
android:label="Insurance Delivery"
android:theme="@style/AppTheme.NoActionBar">
</activity>
</application>
我已经按照本教程进行操作但仍然遇到此错误。我已经对我的清单文件,gradle文件进行了更改
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
packagingOptions {
exclude 'LICENSE.txt'
}
defaultConfig {
applicationId "hushtagstudios.com.towme"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
multiDexEnabled false
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.google.firebase:firebase-auth:15.0.0'
implementation 'com.google.firebase:firebase-database:15.0.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.nightonke:boommenu:2.1.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.flaviofaria:kenburnsview:1.0.7'
implementation 'com.google.firebase:firebase-core:15.0.0'
implementation 'com.google.firebase:firebase-messaging:15.0.0'
implementation 'com.android.support:multidex:1.0.3 '
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.android.gms:play-services-maps:15.0.0'
implementation 'com.google.android.gms:play-services-places:15.0.0'
implementation 'com.google.android.gms:play-services-location:15.0.0'
implementation 'com.github.jd-alexander:library:1.1.0'
implementation 'com.github.bumptech.glide:glide:4.0.0'
implementation 'com.firebase:geofire-android:2.2.0'
implementation 'com.google.firebase:firebase-storage:15.0.0'
testImplementation 'junit:junit:4.12'
implementation 'com.google.code.gson:gson:2.8.0'
}
apply plugin: 'com.google.gms.google-services'
我已从您的回答中更新但不幸的是我的应用仍未运行。 我更新了我的multidex,我不知道为什么这个问题在我更新了我的android studio版本后出现了
Caused by: java.lang.RuntimeException: Job failed, see logs for details
at com.android.build.gradle.internal.transforms.ProGuardTransform.transform(ProGuardTransform.java:196)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:221)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:217)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:212)
at sun.reflect.GeneratedMethodAccessor572.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:46)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
... 32 more
Caused by: java.io.IOException: Please correct the above warnings first.
at proguard.Initializer.execute(Initializer.java:473)
at proguard.ProGuard.initialize(ProGuard.java:233)
at proguard.ProGuard.execute(ProGuard.java:98)
at com.android.build.gradle.internal.transforms.BaseProguardAction.runProguard(BaseProguardAction.java:61)
at com.android.build.gradle.internal.transforms.ProGuardTransform.doMinification(ProGuardTransform.java:253)
at com.android.build.gradle.internal.transforms.ProGuardTransform.access$000(ProGuardTransform.java:63)
at com.android.build.gradle.internal.transforms.ProGuardTransform$1.run(ProGuardTransform.java:173)
at com.android.builder.tasks.Job.runTask(Job.java:47)
at com.android.build.gradle.tasks.SimpleWorkQueue$EmptyThreadContext.runTask(SimpleWorkQueue.java:41)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:282)
... 1 more