好的,我知道这个话题已经在堆栈溢出中了,但是我做了我能做的一切,我在gradle中做了multydex事情,我做了我试图在stackoverflow上得到的所有答案,现在我真的需要这方面的帮助,昨天我尝试解决此问题3个小时后无法运行我的应用程序,希望你们能帮到我
这是我的应用程序gradle文件
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "myproject.myname.com.myapp"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.google.firebase:firebase-storage:9.0.0'
compile 'com.google.firebase:firebase-database:9.0.0'
compile 'com.google.firebase:firebase-auth:9.0.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.firebaseui:firebase-ui-database:0.4.4'
compile 'com.squareup.picasso:picasso:2.5.2'
}
apply plugin: 'com.google.gms.google-services'
这是我的项目gradle文件
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
如果我尝试将multidex = true和所有多路复用线相加,则会出现此错误
Error:Execution failed for task ':app:packageAllReleaseClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzajj.class
我真的很困惑,从昨天开始我找不到答案,如果有人可以帮助我,我会很高兴,谢谢
更新
好的,看来Firebase编译正在引起java jdk值错误的问题
将其更改为版本9.4.0后,它可以正常工作
最佳答案
将ffirebase:firebase-storage
,'com.google.firebase:firebase-database:9.0.0
','com.google.firebase:firebase-auth:'版本更改为 9.4.0 而不是9.0.0
让我知道这是否适合您。
关于java - Android Studio JDK完成非零值2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39398583/