Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<uses-permission> tag appears after <application> tag

Tags:

java

android

im having a problem which is saying tag appears after tag and the error is showing in this line this is my mainfest.xml i hope you can help me and thanks in advance :D

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="imamalsajadsayings.android.com" android:versionCode="1"
    android:versionName="1.0">


    <uses-sdk android:minSdkVersion="7"
        android:targetSdkVersion="19" />

        <application 
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        <activity 
            android:name="com.google.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation" />
        <activity
            android:name="imamalsajadsayings.android.com.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>
</application>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
like image 982
Nasser Ali Avatar asked Dec 21 '13 13:12

Nasser Ali


1 Answers

it should be like this

Put your user-permission tag just below the user-sdk and above the application tag

   <manifest xmlns:android="http://schemas.android.com/apk/res/android"
   package="com.test.app"
   android:versionCode="1"
   android:versionName="1.0" >

   <uses-sdk
    android:minSdkVersion="16"
    android:targetSdkVersion="17" />

   <uses-permission android:name="android.permission.INTERNET" />
   <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

   <application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activityandroid:name="com.test.app.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>
like image 109
rupesh Avatar answered Nov 11 '22 15:11

rupesh