I have a problem installing android gradle. In short, I created 2 flavors:
productFlavors{ abcDemoFree{ } abcDemo{ } }
The Eeach flute has its own actions (Settings.java) and layout (settings_layout.xml) for this action. Both files were deleted from the main one, therefore Settings.java and settings_layout.xml exist only in aromas.
abcDemoFree - java - Settings.java - res - settings_layout.xml abcDemo - java - Settings.java - res - settings_layout.xml
Android Studio has created 4 build options:
abcDemoFreeDebug abcDemoFreeRelease abcDemoDebug abcDemoRelease
Everything works well, I can create an apk with the behavior that I expect from every fragrance. The problem is that when I switch to one buildVariant, for example, to abcDemoDebug, the android studio reports errors from the resource file in a different color, in my example from abcDemoFreeDegub / res / settings_layout.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" </LinearLayout>
These lines
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"
generate errors: URI not registered.
How to get rid of these errors? Or maybe this is normal behavior?
android gradle android-productflavors
Bandzio
source share