Uploading react native app bundle to Google play console for testing but it shows me : You uploaded an APK or app bundle with a shortcuts XML configuration with the following error: Element '<shortcut>' is missing a required attribute, 'android:shortcutId'. My shortcuts.xml File:
<?xml version="1.0" encoding="utf-8"?>
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut android:shortcutId="ID_test" android:enabled="true"
android:shortcutShortLabel="@string/compose_shortcut_short_label"
android:shortcutLongLabel="@string/compose_shortcut_long_label">
<intent android:action="android.intent.action.VIEW"
android:targetPackage="com.nativebasetest2"
android:targetClass="com.nativebasetest2.MainActivity" />
<!-- If your shortcut is associated with multiple intents, include them
here. The last intent in the list determines what the user sees when
they launch this shortcut. -->
<categories android:name="android.shortcut.conversation" />
<capability-binding android:key="actions.intent.OPEN_APP_FEATURE" />
<capability android:name="actions.intent.OPEN_APP_FEATURE">
<intent android:action="android.intent.action.VIEW"
android:targetPackage="com.nativebasetest2"
android:targetClass="com.nativebasetest2.MainActivity">
<extra android:key="requiredForegroundActivity"
android:value="com.nativebasetest2/MainActivity"/>
</intent>
</capability>
</shortcuts>
AndroidManifest.xml File:
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenSize|uiMod"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity>
Please help me to find what is wrong here, TIA
I solved it by doing change in android/build.gradle.