android - Flavored Activity can't be found on launch -


i have created 2 flavors in android studio's gradle, , put mainactivity file in respective folder structures.

this how project looks:

enter image description here

this gradle flavor part:

productflavors {         free {             applicationid "com.xxxxx.yyyyy.free"             versionname "1.0.0"         }         full {             applicationid "com.xxxxx.yyyyy"             versionname "1.0.0"         }     } 

unfortunately, when use full flavor, mainactivity considered unset.

free flavor:

enter image description here

full flavor:

enter image description here

the project can compiled in both flavors, can't run on full flavor can't find default activity. 2 files have minimal differences.

what should check?

perhaps not directly addressing issue, have considered making pure java helper class provides different functionality mainactivity?

the problem here appears moving mainactivity not being recognized androidmanifest when in full mode, if have 2 versions of helper class should good

edit if want specify 2 different activities, use relative path in androidmanifest.

<activity android:name=".mainactivity"> 

be cautious try , reuse common code possible between 2 activities save headaches down road though


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

json - Gson().fromJson(jsonResult, Myobject.class) return values in 0's -