小编Ang*_*raj的帖子

任务的Android Studio 3.0执行失败:无法合并dex

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)

android build-error android-studio-3.0

67
推荐指数
7
解决办法
9万
查看次数

Android Studio String.format() 中的“格式化错误的参数类型错误”

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)”

android lint

5
推荐指数
1
解决办法
6458
查看次数

标签 统计

android ×2

android-studio-3.0 ×1

build-error ×1

lint ×1