Perhaps another approach:
Similar in most ways to what is mentioned here except you just point to your release keystore within your debug buildType.
Exact steps:
1) In your app Gradle file in the android
tag add a release signing config:
signingConfigs {
release {
storeFile file("Path_to_your_Production_release_Keystore.jks")
storePassword 'your_keystore_password'
keyAlias 'your_key_alias'
keyPassword 'your_key_password'
}
}
and add the signing config to your debug buildType:
buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-project.txt', 'proguard-google-api-client.txt'
}
debug {
signingConfig signingConfigs.release
debuggable true
}
}
2) Make sure the versionCode
and versionName
in your app gradle > defaultConfig
section matches exactly what's in the apk you uploaded to the play store:
defaultConfig {
applicationId "com.groovypackagename.groovyapp"
minSdkVersion 16
targetSdkVersion 24
versionCode 56
versionName "0.9.6"
multiDexEnabled true
resConfigs "en"
}
3) Make sure to add the billing permission to your manifest:
<uses-permission android:name="com.android.vending.BILLING" />
4) Don't forget to add your IAB (In App Billing) products per the docs
5) Set your break points and debug per usual.
6) After you have successfully tricked out your code, don't forget to clean up at least the changes in your gradle file such as removing the signing config so your kestore passwords aren't floating around in space.
With any luck you will be able to do local debugging for your IAB code.
Cheers.