For some unknown for me reason, Android studio keeps building signed APK in Debug mode all the time, thus I am unable to publish it in google play store.
I set all my modules to Release in build variant, as you can see in the image above.
I am building signed APK, by pressing BUILD -> Generate Signed APK
I DO select RELEASE in build type, and once APK is generated, it even is contains "release" in its name.
Would be grateful for some help, thank you.
Edit:
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'
Answer: it turns out, one of my modules Manifest file, contained
android:debuggable="true"
First of all, it should not be used in Android Manifest any longer (deprecated) while building with Android Studio.