对于一些不为人知的原因,Android工作室一直在调试模式下构建已签名的APK,因此我无法在Google Play商店中发布它。
我将所有模块设置为发布版本中的Release,如上图所示。
我正在建立已签名的APK,按下BUILD - >生成签名APK
我在构建类型中选择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'
答案 0 :(得分:0)
答案:事实证明,我的模块之一是Manifest文件,包含
android:debuggable="true"
首先,在使用Android Studio构建时,不应再在Android Manifest中使用它(已弃用)。