How To Have Both Debug And Release Apk On Same Device?
Solution 1:
Use Android Studio because gradle make your life a lot easier - just use applicationIdSuffix
android {
...
buildTypes {
release {...}
debug {
applicationIdSuffix '.debug'
}
}
}
For more go here.
Solution 2:
The only way I know is to change the package name in your applications manifest file. Eclipse should handle all the code renaming for you.
Solution 3:
Could you put all your code in a Library Project and then just have two normal projects, that have different package names and just include the library project in both?
This should keep all your code in one place. The normal projects would most likely only need a valid manifest file that points to the activities in the library project.
Solution 4:
You may want to try this technique using ant, Jenkins and perhaps other tools to automate package renames as suggested by @LAS_VEGAS.
Although not what you asked for, this cool code snippet can help you find out at runtime whether your code is debug or release.
Another interesting such attempt can be found in this thread. I am not sure though if it works on Android.
Solution 5:
In Android Studio, Adding build variants using Product Flavours which can be easily customized for various environments and to test side by side multiple app variants of same app. Check out this link for more information - Configuring Gradle
Post a Comment for "How To Have Both Debug And Release Apk On Same Device?"