Search code examples
javaandroidxmlandroid-studioandroid-manifest

Android Studio Manifest file error


Something went wrong with my AndroidManifest.xml file. I was launching tests one more time when suddenly Android Studio crashed, launched again and then next error occured (I'm sorry, I don't have enough rating to upload pictures directly): enter image description here

Here is the gradle console: enter image description here

My strings.xml file is ok:

<resources>
<string title="app_name">PaySpaceMagazine</string>
<string title="hello_world">Hello world!</string>
<string title="action_settings">Settings</string>

<string title="actual">Актуально</string>
<string title="last_news">Последние известия</string>

Also there is other manifest file without any errors:

<?xml version="1.0" encoding="utf-8"?>

<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" >
    <activity
        android:name=".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>

Did anyone have same problem?


Solution

  • in the Manifest you posted in the screenshot you are using android:title instead of android:name for your Activitys. Change it with

     android:name=".MainActivity"
    

    the property is mandatory. You can read more here