Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 635
SSH Avatar asked Jul 03 '15 07:07

SSH


People also ask

What is an AndroidManifest XML file?

Every app project must have an AndroidManifest. xml file (with precisely that name) at the root of the project source set. The manifest file describes essential information about your app to the Android build tools, the Android operating system, and Google Play.

What is the difference between the Android versionCode and Android versionName attributes in the AndroidManifest XML fi le?

Android Application has two properties named versionName and versionCode in its AndroidManifest. xml file. Both specify the version of the application. versionName is what the user sees and can be any String.

What is the difference between layout XML file and manifest XML file?

The manifest file presents essential information about your app to the Android system, information the system must have before it can run any of the app's code. And, regarding other XML files, almost all of the other data, apart from the code, everything is specified in an XML format.

What is AndroidManifest XML file?

This is the required xml file for all the android application and located inside the root directory. A simple AndroidManifest.xml file looks like this: The elements used in the above xml file are described below. manifest is the root element of the AndroidManifest.xml file.

What is the difference between AndroidManifest and application in Android?

manifest is the root element of the AndroidManifest.xml file. It has package attribute that describes the package name of the activity class. application is the subelement of the manifest.

What is the XML file for Android application?

This is the required xml file for all the android application and located inside the root directory. A simple AndroidManifest.xml file looks like this: The elements used in the above xml file are described below.

What are the different elements in the Android manifest?

The Android Manifest can support a huge range of different elements, but there’s a few that you’ll find in pretty much every single AndroidManifest.xml file: 1. Package name The Manifest’s root element must specify your app’s package name, which typically matches your project’s directory structure, for example:


1 Answers

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.

like image 100
Bastien Viatge Avatar answered Nov 08 '22 15:11

Bastien Viatge