There is a requirement - depending on the type of assembly, run 2 different Activity .
build.gradle has the following:
productFlavors { flavor1 { manifestPlaceholders = [ mainActivity:".ui.activities.Activity1"] } flavor2 { manifestPlaceholders = [ mainActivity:".ui.activities.Activity2"] } And in AndroidManifest.xml following:
... <application android:name=".MyApp" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme"> <activity android:name="${mainActivity}" //<<<что то тут не так android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> ... The AS highlights in red, indicating that it does not know what the path is and an error is displayed when the application starts.
Is it possible to determine different starting activities for different flavors?