0

Gives errors: Android resource linking failed D:\AndroidStudioProjects\AndroidStudioProjects\NewProject\app\build\intermediates\packaged_manifests\debug\AndroidManifest.xml:2: error: attribute android:platformBuildVersionCode not found. D:\AndroidStudioProjects\AndroidStudioProjects\NewProject\app\build\intermediates\packaged_manifests\debug\AndroidManifest.xml:2: error: attribute android:platformBuildVersionName not found. error: failed processing manifest.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:versionCode="10000"
    android:versionName="1.0.0"
    android:compileSdkVersion="32"
    android:compileSdkVersionCodename="12"
    android:platformBuildVersionCode="32"
    android:platformBuildVersionName="12"
    package="com.newproject.apk">

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

    <supports-screens
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true" />

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

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

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

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

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

    <application
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.NewProject"
        tools:targetApi="31">
        <activity
            android:name=".MainActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data
                android:name="android.app.lib_name"
                android:value="" />
        </activity>
    </application>

</manifest>

Code lines: 8, 9, 13, 14, 29.

Please tell me how can I fix these errors!?

Serzh
  • 31
  • 1
  • 3
  • From what I can tell, it's supposed to be `platformBuildVersionName`/`platformBuildVersionCode` (_without_ the `android` namespace) according to this question: https://stackoverflow.com/questions/39291397/whats-platformbuildversioncode-and-platformbuildversionname-in-extracted-apks - (Note that it mentions that these values are likely auto-inserted into your Android manifest via the compiler) – Edric Sep 16 '22 at 01:19
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Sep 17 '22 at 14:37

0 Answers0