I encounter the following error when running gradle build:
Missing 'name' key attribute on element activity at AndroidManifest.xml
Looking up the other stackoverflow questions, I commented out the "intent-filter" parts, but the error still remains. Current AndroidManifest.xml:
<manifest xmlns:android="https://schemas.android.com/apk/res/android"
package="com.example.MyProject"
android:versionCode="1"
android:versionName="1.0"
<uses-sdk
android:misSdkVersion="24"
android:targetSdkVersion="28" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main" >
</activity>
</application>
</manifest>
Any suggestions? Thanks in advance
CodePudding user response:
use http in xmlns:android
"http://schemas.android.com/apk/res/android"
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.MyProject"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:misSdkVersion="24"
android:targetSdkVersion="28" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main" >
</activity>
</application>
</manifest>
CodePudding user response:
Specificy a name tag on the Application section of your Android manifest file
<application
// need to declare a name tag here
android:name=""
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main" >
</activity>
</application>