Android studio - 不断生成调试签名的 APK

Android studio - keeps generating Debug signed APK

由于某些我不知道的原因,Android 工作室一直在调试模式下构建签名的 APK,因此我无法在 google Play 商店中发布它。

我将我的所有模块设置为在构建变体中发布,如上图所示。

我正在构建签名的 APK,方法是按“构建”->“生成签名的 APK”

我在构建类型中做 select RELEASE,一旦生成 APK,它甚至在其名称中包含 "release"。

不胜感激,谢谢。

编辑:

AndroidManifest.xml

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

<uses-sdk
    android:minSdkVersion="15"
    android:targetSdkVersion="16" />
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/Theme.NoBackground" >
    <activity
        android:name=".ConstructionCityActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|mcc|mnc"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity> 



    <!--Include the AdActivity configChanges and theme. -->
    <activity android:name="com.google.android.gms.ads.AdActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
        android:theme="@android:style/Theme.Translucent" />

    <!-- Required activities for playback of Vungle video Ads -->

    <activity android:name="com.vungle.publisher.VideoFullScreenAdActivity"
        android:configChanges="keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>

    <activity android:name="com.vungle.publisher.MraidFullScreenAdActivity"
        android:configChanges="keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize"
        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>

</application>

Build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.heavyfall.constructioncity"
        minSdkVersion 15
        targetSdkVersion 23
    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/ASL2.0'
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles 'proguard-project.txt'
        }
        debug {
            debuggable false
        }
    }
}

repositories {
    maven {
        name "Fyber's maven repo"
        url "https://fyber.bintray.com/maven"
    }
    flatDir {
        dirs "libs"
    }
}

dependencies {
    compile(name: 'heyzap-unified-platform-10.0.9', ext: 'aar')
    compile 'com.google.firebase:firebase-core:9.6.1'
    compile 'com.google.firebase:firebase-ads:9.6.1'
    compile project(':andEngine')
    compile project(':andEngineTexturePackerExtension')
    compile project(':andEnginePhysicsBox2DExtension')
    compile files('libs/bolts-android-1.2.1.jar')
    compile files('libs/dagger-2.7.jar')
    compile files('libs/javax.inject-1.jar')
    compile files('libs/nineoldandroids-2.4.0.jar')
    compile files('libs/Parse-1.10.3.jar')
    compile files('libs/vungle-publisher-adaptive-id-4.0.3.jar')
}

apply plugin: 'com.google.gms.google-services'

答案:原来,我的模块清单文件之一,包含

android:debuggable="true" 

首先,在使用 Android Studio 构建时,不应再在 Android Manifest 中使用它(已弃用)。