android studio在构建执行时出现构建错误,其中包含以下"错误:执行任务失败":app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException:java.lang.RuntimeException:com.android.builder.dexing.DexArchiveMergerException:无法合并dex"
我的app:build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.pdroid.foodieschoice"
minSdkVersion 16
targetSdkVersion 25
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.android.support.constraint:constraint-layout:1.0.2'
compile 'com.firebaseui:firebase-ui-auth:2.3.0'
testCompile 'junit:junit:4.12'
}
configurations.all {
resolutionStrategy {
force 'com.android.support:appcompat-v7:26.0.1'
force 'com.android.support:support-compat:26.0.1'
force 'com.android.support:support-core-ui:26.0.1'
force 'com.android.support:support-annotations:26.0.1'
force 'com.android.support:recyclerview-v7:26.0.1'
}
}
apply plugin: …Run Code Online (Sandbox Code Playgroud) TextView textview = (TextView)findViewById(timeScore);
i = (int)(gridView.getTime() / 1000L);
String s = getString(time_score);
Object aobj[] = new Object[1];
aobj[0] = Integer.valueOf(i);
textview.setText(String.format(s, aobj));
Run Code Online (Sandbox Code Playgroud)
上次转换 aobj 时 Android Studio 出现错误
“time_score 中格式化参数 #1 的参数类型错误:转换“d”,收到对象(方法调用中的参数 #2)”