`Description:’
‘I’m encountering several errors while trying to build my Android project. Could someone please help me troubleshoot these issues?’
‘Errors:’
‘Attribute android:allowBackup is not allowed here:10
Attribute android:hardwareAccelerated is not allowed here:11
Attribute android:networkSecurityConfig is not allowed here:12
Attribute android:icon is not allowed here:13
Attribute tools:targetApi is not allowed here:16
Unresolved class ‘MainActivity’:21
Attribute android:configChanges is not allowed here:22
Unresolved class ‘PrivacyActivity’:28
Code:`
<manifest xmlns:android=”http://schemas.android.com/apk/res/android”
package=”com.company.gamename”>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:networkSecurityConfig="@xml/network_security_config"
android:icon="@mipmap/icon"
android:label="@string/app_name"
android:theme="@style/Theme.Game">
<activity
android:name=".MainActivity"
android:exported="true"
android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".PrivacyActivity" />
<meta-data
android:name="com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT"
android:value="true"/>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-9777034540867573~9744938716" />
</application>
Jhon Rosales is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.