SSH
SSH

Reputation: 1627

Difference in AndroidManifest.xml

I am asking this to make my understanding clear about this. Currently, I have developed few android apps using eclipse. Now I have switched to Android studio and the very first thing I observed is that my manifest file doesn't have

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

which I had in eclipse, instead I have this in my build.gradle(Module: app) in AS.

defaultConfig {
        applicationId "com.example.testing"
        minSdkVersion 10
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }

So my question is : is this info added to manifest later and if not, then how the app will recognize its min and target sdk. I am little confused with the structure in AS.

Upvotes: 6

Views: 244

Answers (1)

Bastien Viatge
Bastien Viatge

Reputation: 315

Yes, the value inside your build.gradle will be added to the manifest when you'll be launching your app. In fact even if you add manually sdk parameter in the manifest, it will be overridden by the gradle value !
It seems that the manifest shown in the explorer is like a preview of the final manifest.

Upvotes: 3

Related Questions