这是我的确切错误:
Error:Execution Failed for task ':app:transformDexArchiveWithExternallibsDexMergerForDeBUG'.> java.lang.RuntimeException: com.androID.builder.dexing.DexArchiveMergerException: Unable to merge dex
应用文件
apply plugin: 'com.androID.application'apply plugin: 'com.Google.protobuf'ext { supportlibraryVersion = '27.0.1' grpcVersion = '1.4.0'}repositorIEs { maven { url "https://plugins.gradle.org/m2/" }}androID { compileSdkVersion 27 defaultConfig { applicationID "aviraj.firebaseapp" minSdkVersion 21 targetSdkVersion 27 versionCode 1 versionname "1.0" testInstrumentationRunner "androID.support.test.runner.AndroIDJUnitRunner" multIDexEnabled true dexOptions { jumboMode true javaMaxHeapSize "4g" } javaCompileOptions { annotationProcessorOptions { includeCompileClasspath false } } } buildTypes { release { MinifyEnabled false proguardfiles getDefaultProguardfile('proguard-androID.txt'),'proguard-rules.pro' } } signingConfigs { release { storefile file(project.propertIEs.storefile) storePassword project.propertIEs.storePassword keyAlias project.propertIEs.keyAlias keyPassword project.propertIEs.keyPassword } } configurations.all { resolutionStrategy.force 'com.Google.code.findBUGs:Jsr305:3.0.2' resolutionStrategy.force "com.androID.support:support-annotations:$supportlibraryVersion" }}dependencIEs { implementation filetree(dir: 'libs',include: ['*.jar']) //noinspection GradleCompatible implementation 'com.androID.support:appcompat-v7:27.0.1' implementation 'com.androID.support:mediarouter-v7:27.0.1' implementation 'com.androID.support.constraint:constraint-layout:1.0.2' implementation 'com.Google.cloud:Google-cloud-speech:0.30.0-Alpha' implementation 'com.Google.APIs:Google-API-services-speech:v1-rev21-1.23.0' implementation 'com.Google.firebase:firebase-core:11.4.2' implementation 'com.Google.firebase:firebase-auth:11.4.2' testImplementation 'junit:junit:4.12' androIDTestImplementation 'com.androID.support.test:runner:1.0.1' androIDTestImplementation 'com.androID.support.test.espresso:espresso-core:3.0.1' implementation 'com.androID.support:design:27.0.1' implementation 'com.Google.androID.gms:play-services-auth:11.4.2' implementation filetree(dir: 'libs',include: ['*.jar']) //noinspection GradleCompatible implementation "com.androID.support:cardvIEw-v7:$supportlibraryVersion" implementation "com.androID.support:recyclervIEw-v7:$supportlibraryVersion" // gRPC implementation "io.grpc:grpc-okhttp:$grpcVersion" implementation('io.grpc:grpc-protobuf-lite:$grpcVersion') { exclude module: "protobuf-lite" } implementation "io.grpc:grpc-stub:$grpcVersion" implementation 'javax.annotation:javax.annotation-API:1.3.1' implementation 'com.Google.protobuf:protobuf-java:3.4.0' implementation 'com.androID.support:multIDex:1.0.2' implementation 'com.androID.support:multIDex-instrumentation:1.0.2' // OAuth2 for Google Api implementation('com.Google.auth:Google-auth-library-oauth2-http:0.7.0') { exclude module: 'httpclIEnt' }}protobuf { protoc { artifact = 'com.Google.protobuf:protoc:3.3.0' } plugins { javalite { artifact = "com.Google.protobuf:protoc-gen-javalite:3.0.0" } grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" } } generateProtoTasks { all().each { task -> task.plugins { javalite {} grpc { // Options added to --grpc_out option 'lite' } } } }}task copySecretKey(type: copy) { def file secretKey = file "$System.env.Google_APPliCATION_CREDENTIALS" from secretKey.getParent() include secretKey.getname() into 'src/main/res/raw' rename secretKey.getname(),"credential.Json"}preBuild.dependsOn(copySecretKey)apply plugin: 'com.Google.gms.Google-services'
项目文件
// top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositorIEs { Google() jcenter() } dependencIEs { classpath 'com.androID.tools.build:gradle:3.0.1' classpath 'com.Google.protobuf:protobuf-gradle-plugin:0.8.3' classpath 'com.Google.gms:Google-services:3.1.2' // NOTE: Do not place your application dependencIEs here; they belong // in the indivIDual module build.gradle files }}allprojects { repositorIEs { Google() jcenter() maven { url "https://maven.Google.com" // Google's Maven repository } }}task clean(type: Delete) { delete rootProject.buildDir}
我在这里看了很多其他的问题和答案,但似乎无法找到解决问题的解决方案:(
Logcat.txt
11-29 15:01:45.332 3192-3192/aviraj.firebaseapp E/libprocessgroup: Failed to make and chown /acct/uID_10058: Read-only file system11-29 15:01:45.332 3192-3192/aviraj.firebaseapp W/Zygote: createProcessGroup Failed,kernel missing CONfig_CGROUP_cpuACCT?11-29 15:01:45.333 3192-3192/aviraj.firebaseapp I/art: Not late-enabling -Xcheck:jni (already on)11-29 15:01:46.509 3192-3192/aviraj.firebaseapp W/DynamiteModule: Local module descriptor class for com.Google.firebase.auth not found.11-29 15:01:46.512 3192-3192/aviraj.firebaseapp W/DynamiteModule: Local module descriptor class for com.Google.firebase.auth not found.11-29 15:01:46.690 3192-3207/aviraj.firebaseapp W/art: Suspending all threads took: 18.126ms11-29 15:01:46.695 3192-3192/aviraj.firebaseapp I/BiChannelGoogleAPI: [FirebaseAuth: ] No Fallback module; NOT setting up for lazy initialization11-29 15:01:46.699 3192-3207/aviraj.firebaseapp I/art: Background sticky concurrent mark sweep GC freed 2654(220KB) AllocSpace objects,0(0B) LOS objects,22% free,870KB/1117KB,paused 20.288ms total 38.896ms11-29 15:01:46.737 3192-3192/aviraj.firebaseapp D/FirebaseAuth: Notifying ID token Listeners about user ( dPtIj9CudnMzI3SRp9NVzA2609P2 ).11-29 15:01:46.753 3192-3213/aviraj.firebaseapp W/DynamiteModule: Local module descriptor class for com.Google.firebase.auth not found.11-29 15:01:46.765 3192-3192/aviraj.firebaseapp D/FirebaseApp: com.Google.firebase.crash.FirebaseCrash is not linked. SkipPing initialization.11-29 15:01:46.787 3192-3213/aviraj.firebaseapp I/FirebaseAuth: [FirebaseAuth:] Loading module via FirebaSEOptions.11-29 15:01:46.788 3192-3213/aviraj.firebaseapp I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to gms implementation11-29 15:01:47.120 3192-3192/aviraj.firebaseapp I/FirebaseInitProvIDer: FirebaseApp initialization successful11-29 15:01:47.121 3192-3192/aviraj.firebaseapp I/InstantRun: starting instant run server: is main process11-29 15:01:47.137 3192-3216/aviraj.firebaseapp I/FA: App measurement is starting up,version: 1171711-29 15:01:47.138 3192-3216/aviraj.firebaseapp I/FA: To enable deBUG logging run: adb shell setprop log.tag.FA VERBOSE11-29 15:01:47.138 3192-3216/aviraj.firebaseapp I/FA: To enable faster deBUG mode event logging run: adb shell setprop deBUG.firebase.analytics.app aviraj.firebaseapp11-29 15:01:47.479 3192-3192/aviraj.firebaseapp W/art: Before AndroID 4.1,method androID.graphics.PorterDuffcolorFilter androID.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(androID.graphics.PorterDuffcolorFilter,androID.content.res.colorStateList,androID.graphics.PorterDuff$Mode) would have incorrectly overrIDden the package-private method in androID.graphics.drawable.Drawable11-29 15:01:47.814 3192-3207/aviraj.firebaseapp I/art: Background sticky concurrent mark sweep GC freed 1024(125KB) AllocSpace objects,8% free,2MB/2MB,paused 6.067ms total 17.836ms11-29 15:01:47.851 3192-3207/aviraj.firebaseapp W/art: Suspending all threads took: 5.990ms11-29 15:01:47.856 3192-3207/aviraj.firebaseapp I/art: Background sticky concurrent mark sweep GC freed 2815(100KB) AllocSpace objects,5% free,paused 8.159ms total 18.179ms11-29 15:01:47.895 3192-3192/aviraj.firebaseapp I/TextinputLayout: EditText added is not a TextinputEditText. Please switch to using that class instead.11-29 15:01:47.901 3192-3192/aviraj.firebaseapp I/TextinputLayout: EditText added is not a TextinputEditText. Please switch to using that class instead.11-29 15:01:47.941 3192-3216/aviraj.firebaseapp I/FA: Tag Manager is not found and thus will not be used11-29 15:01:47.980 3192-3220/aviraj.firebaseapp D/Openglrenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true11-29 15:01:47.983 3192-3192/aviraj.firebaseapp D/gralloc_ranchu: Emulator without host-sIDe GPU emulation detected. Loading gralloc.default.so from /vendor/lib/hw/gralloc.default.so...11-29 15:01:47.983 3192-3192/aviraj.firebaseapp D/gralloc_ranchu: gralloc.default.so not found in /vendor. Trying /system/lib/hw/gralloc.default.so...11-29 15:01:47.983 3192-3192/aviraj.firebaseapp D/Atlas: ValIDating map...11-29 15:01:47.987 3192-3192/aviraj.firebaseapp D/FirebaseApp: Notifying auth state Listeners.11-29 15:01:47.988 3192-3192/aviraj.firebaseapp D/FirebaseApp: NotifIEd 0 auth state Listeners.11-29 15:01:48.044 3192-3220/aviraj.firebaseapp I/Openglrenderer: Initialized EGL,version 1.411-29 15:01:48.047 3192-3220/aviraj.firebaseapp D/Openglrenderer: Enabling deBUG mode 011-29 15:01:48.134 3192-3192/aviraj.firebaseapp W/art: Before AndroID 4.1,method int androID.support.v7.Widget.ListVIEwCompat.lookForSelectableposition(int,boolean) would have incorrectly overrIDden the package-private method in androID.Widget.ListVIEw11-29 15:01:49.236 3192-3192/aviraj.firebaseapp I/Choreographer: Skipped 64 frames! The application may be doing too much work on its main thread.11-29 15:06:48.122 3192-3213/aviraj.firebaseapp I/FirebaseAuth: [FirebaseAuth:] Loading module via FirebaSEOptions.11-29 15:06:48.122 3192-3213/aviraj.firebaseapp I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to gms implementation11-29 15:23:26.747 3192-3192/aviraj.firebaseapp I/Choreographer: Skipped 36 frames! The application may be doing too much work on its main thread.
proguard-rules.pro
# Suppress warnings from gRPC dependencIEs-dontwarn com.Google.common.**-dontwarn com.Google.API.clIEnt.**-dontwarn com.Google.protobuf.**-dontwarn io.grpc.**-dontwarn okio.**-dontwarn com.Google.errorprone.annotations.**-dontwarn com.Google.androID.gms.**-keep class com.Google.androID.gms.** { *; }-keep class com.Google.firebase.**-keep class io.grpc.internal.DnsnameResolveProvIDer-keep class io.grpc.okhttp.OkhttpChannelProvIDer
以下是我的gradle依赖项的完整列表:
Gradle Dependencies – Pastebin
解决方法 尝试添加:实现’com.androID.support:multIDex:1.0.2′ 在你的应用程序gradle中. 如果这对您有用,请告诉我. 总结以上是内存溢出为你收集整理的无法将android studio 3.0.1中的dex与最新的gradle合并全部内容,希望文章能够帮你解决无法将android studio 3.0.1中的dex与最新的gradle合并所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)