Who has higher priority build.gradle or AndroidManifest Android Studio

build.gradle in module have higher priority then AndrodiManifest.xml
Try this.
AndroidManifest.xml have code:

    <uses-sdk
        android:minSdkVersion="9"
        android:targetSdkVersion="23" />

build.gradle have code:

   defaultConfig {
        applicationId "cz.okhelp.words"
        minSdkVersion 9
        targetSdkVersion 19
        versionCode 107
        versionName "1.0.7"
    }

Warning in AndroidManifest.xml:
This targetSdkVersion value (23) is not used; it is always overridden by the value specified in the Gradle build script (19) less... (Ctrl+F1)
The value of (for example) minSdkVersion is only used if it is not specified in the build.gradle build scripts. When specified in the Gradle build scripts, the manifest value is ignored and can be misleading, so should be removed to avoid ambiguity.

This entry was posted in Android Studio, Bugs, warnings, errors and tagged . Bookmark the permalink.


Comments are closed.

816 views