deployment - Android Gradle Build Variant Deploy -
I have finished installing build variants with Grad in Android Studio What is this for a specific demo / pro setup? Ashish I am able to fix my 'Demo Debug' app perfectly. When I switch to 'proDebug' and 'run' with the same configuration, this pro app installs fine, but it starts crashing:
start: int {act = android. Intent.action.MAIN cat = [Android.intent.category.LAUNCHER] cmp = com.anthonymandra.rawdroidpro / com.anthonymandra.rawdroid.RawDroid} Error type 3 error: activity class {com.anthonymandra.rawdroidpro / com .anthonymandra.rawdroid.RawDroid} does not exist.
If I go to the dashboard then I can launch a pro version and It works according to the expectations. Therefore, the installed version works for the appropriate version; only something in the wrong (on Pro).
build.gradle Flavors:
ProductFlavors {Demo {PackageName "com.anthonymandra.rawdroid"} pro {packageName "com .anthonymandra.rawdroidpro"} proAmazon {packageName "com.anthonymandra.rawdroidpro"}}
Update
issue to unmodify unchangeable information
When I decompressed the APK, I confirmed that any Gradle override is being applied in Android.manifest Defense was.
After the
First of all you must be PackageName in the same manner (not recommended as recommended):
youractualapplicationpackage.flavorname
But you may want to packagname whatever you want in your case:
ProductFlavors {Demo {packagename "com.anthonymandra.rawdroiddemo"} pro {packagename "com.anthonymandra.rawdroidpro"} proAmazon {packagename "com.anthonymandra.rawdroidpro"}}
Make sure that Apply for
com.anthonymandra.rawdroid Package within your main / java directory.
Your AndroidManifest.xml should be like this ( only inside the main directory ):
& lt; XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Manifest xmlns: Android = "http://schemas.android.com/apk/res/android" package = "com.anthonymandra.rawdroid" & gt; & Lt; Android Android: allowBackup = "true" android: icon = "@draubable / IC_Luncher" Android: label = "@ string / app_name" Android: Theme = "@ Style / Aaptim" & gt; & Lt; Activity Android: "RawDroid" name = Android: configChanges = "keyboardHidden | orientation | screenSize" Android: label = "@ string / app_name" android: theme = "@ style / galleryTheme" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; & Lt; / Application & gt; & Lt; / Reveal & gt;
and it should not be anywhere in the
main directory.
At the compile time, the required package names change and build the build.
Worked well in my machine and I could see two different apps in my device.
Comments
Post a Comment