相关疑难解决方法(0)

如何设置我的gradle最终版本apk

早些时候我的学习时间是这样的:这 是不正确的

    apply plugin: 'android'

android {
    compileSdkVersion 19
    buildToolsVersion '19.0.3'

    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:gridlayout-v7:19.0.1'
    compile 'com.android.support:appcompat-v7:+'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v4:+'
    compile 'com.google.android.gms:play-services:+'
    compile 'com.jakewharton:butterknife:4.0.+'
    compile 'com.google.code.gson:gson:2.2.+'
    compile 'com.google.android.gms:play-services:+'
}
Run Code Online (Sandbox Code Playgroud)

所以上传时我得到了谷歌播放的错误,说apk仍处于调试模式,无法上传该apk.

现在搜索完毕后,我发现我需要更改我的gradle文件,最后我想出了这个gradle:

如果我是正确的,请指导我!

apply plugin: 'android'

android {
    compileSdkVersion 19
    buildToolsVersion '19.0.3'

    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes …
Run Code Online (Sandbox Code Playgroud)

android google-play android-studio build.gradle android-gradle-plugin

10
推荐指数
1
解决办法
9579
查看次数