Reputation: 13
Please someone help me to spot out the errors here from this code syntax.
I've been trying to sort this issue out all day but I've been getting from one issue to another.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.ome.allfreecurrencyconverter">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<activity
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
tools:ignore="WrongManifestParent">
<activity
android:name="com.ome.allfreecurrencyconverter.MainActivity"
android:label="@string/app_name"
tools:ignore="WrongManifestParent">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name="com.ome.allfreecurrencyconverter.Activity_conversion_listview"
android:label="@string/app_name"
tools:ignore="WrongManifestParent" >
</activity>
<activity
android:name="com.ome.allfreecurrencyconverter.Activity_Introactivity"
android:label="@string/app_name"
tools:ignore="WrongManifestParent" >
</activity>
</activity>
</manifest>
Upvotes: 0
Views: 287
Reputation: 1399
You should have Activities tags inside the Application Tag not Activities tag inside another Activity Tag, so you need to replace your first Activity opening Tag by Application.
Your manifest should look like this
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.ome.allfreecurrencyconverter" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
//This is the correct opening tag
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
tools:ignore="WrongManifestParent">
<activity
android:name="com.ome.allfreecurrencyconverter.MainActivity"
android:label="@string/app_name"
tools:ignore="WrongManifestParent">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.ome.allfreecurrencyconverter.Activity_conversion_listview"
android:label="@string/app_name"
tools:ignore="WrongManifestParent">
</activity>
<activity
android:name="com.ome.allfreecurrencyconverter.Activity_Introactivity"
android:label="@string/app_name"
tools:ignore="WrongManifestParent">
</activity>
</application>
</manifest>
Upvotes: 1
Reputation: 2762
You have added the activity in wrong Tag. You should have
xmlns:tools="http://schemas.android.com/tools"
package="com.ome.allfreecurrencyconverter" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
tools:ignore="WrongManifestParent">
<activity
android:name="com.ome.allfreecurrencyconverter.MainActivity"
android:label="@string/app_name"
tools:ignore="WrongManifestParent">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.ome.allfreecurrencyconverter.Activity_conversion_listview"
android:label="@string/app_name"
tools:ignore="WrongManifestParent">
</activity>
<activity
android:name="com.ome.allfreecurrencyconverter.Activity_Introactivity"
android:label="@string/app_name"
tools:ignore="WrongManifestParent">
</activity>
</application>
Upvotes: 0