mac_05185
2022-06-11 14:52
采纳率: 68.3%
浏览 30

Android在编译gradle发生错误


apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.xw.sample.dashboardviewdemo"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 2
        versionName "2.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    android.applicationVariants.all { variant ->
        variant.outputs.each { output ->
            if (output.outputFile != null && output.outputFile.name.endsWith('.apk')) {
                def name = "${rootDir}/apk/sample.apk"
                output.outputFile = file(name)
            }
        }
    }
}

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'
}

img

这个问题是怎么导致的?求一个解决方案

2条回答 默认 最新

相关推荐 更多相似问题