El Dude
El Dude

Reputation: 5618

Ionic5 capacitor fix AndroidManifest.xml for missing activity name

I am not experienced with android build that much hence my question how to add the requested property to the build.

/home/me/app/android/capacitor-cordova-android-plugins/build/intermediates/library_manifest/debug/AndroidManifest.xml:71:9-77:58: AAPT: error: resource string/activity_name (aka com.myapp.app:string/activity_name) not found.
find . -name AndroidManifest*
./app/src/main/AndroidManifest.xml
./app/build/intermediates/instant_app_manifest/debug/AndroidManifest.xml
./app/build/intermediates/merged_manifests/debug/AndroidManifest.xml
./app/build/intermediates/bundle_manifest/debug/bundle-manifest/AndroidManifest.xml
./capacitor-cordova-android-plugins/src/main/AndroidManifest.xml
./capacitor-cordova-android-plugins/build/intermediates/library_manifest/debug/AndroidManifest.xml

So it seems I have to extend ./capacitor-cordova-android-plugins/src/main/AndroidManifest.xml with the required key above, but I am not sure how? This is what capacitor - AndroidManifest.xml looks like, I just do not know what to add there. What is the proper xml key for the missing com.myapp.app:string/activity_name ?

<?xml version='1.0' encoding='utf-8'?>
<manifest package="capacitor.android.plugins"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:amazon="http://schemas.amazon.com/apk/res/android">
<application  >
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent"/>
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value=""/>
<meta-data android:name="firebase_analytics_collection_enabled" android:value="true"/>
<meta-data android:name="google_analytics_automatic_screen_reporting_enabled" android:value="true"/>
<service android:name="by.chemerisuk.cordova.firebase.FirebaseMessagingPluginService">
  <intent-filter>
    <action android:name="com.google.firebase.MESSAGING_EVENT"/>
  </intent-filter>
</service>
<meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="default"/>
<receiver android:name="nl.xservices.plugins.ShareChooserPendingIntent" android:enabled="true">
  <intent-filter>
    <action android:name="android.intent.action.SEND"/>
  </intent-filter>
</receiver>
<provider android:authorities="${applicationId}.sharing.provider" android:exported="false" android:grantUriPermissions="true" android:name="nl.xservices.plugins.FileProvider">
  <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/sharing_paths"/>
</provider>
<activity android:name="com.keyes.youtube.OpenYouTubePlayerActivity" android:screenOrientation="landscape"/>
<activity android:name="com.bunkerpalace.cordova.YouTubeActivity" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:theme="@android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustResize"/>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature android:name="android.hardware.location.gps" android:required="true"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

Upvotes: 3

Views: 2835

Answers (1)

El Dude
El Dude

Reputation: 5618

Ok, I found it. I have to change the YouTubeActivity -> android:label="@string/activity_name" for android:label="@string/app_name" for the build to complete.

Upvotes: 2

Related Questions