Reputation: 5618
My Ionic5 + Capacitor build is failing on android with the error below. If I google I find similar errors that are related to fb_app
settings. I think the android project is misconfigured.
Is it this line in the config below:
android:label="@string/activity_name"
What shall I look for to debug this?
android/capacitor-cordova-android-plugins/build/intermediates/library_manifest/debug/AndroidManifest.xml:50:9-56:58: AAPT: error: resource string/activity_name (aka APP_NAME:string/activity_name) not found.
Here is named file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:amazon="http://schemas.amazon.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
package="capacitor.android.plugins"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="21"
android:targetSdkVersion="29" />
<uses-permission android:name="android.permission.INTERNET" />
<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" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application>
<meta-data
android:name="firebase_analytics_collection_enabled"
android:value="$ANALYTICS_COLLECTION_ENABLED" />
<meta-data
android:name="google_analytics_automatic_screen_reporting_enabled"
android:value="$AUTOMATIC_SCREEN_REPORTING_ENABLED" />
<receiver
android:name="nl.xservices.plugins.ShareChooserPendingIntent"
android:enabled="true" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
</intent-filter>
</receiver>
<provider
android:name="nl.xservices.plugins.FileProvider"
android:authorities="${applicationId}.sharing.provider"
android:exported="false"
android:grantUriPermissions="true" >
<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>
</manifest>
all works well for iOS btw.
Upvotes: 1
Views: 1627
Reputation: 85
in android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml replace @string/activity_name with your any name
assuming you are using capacitor.
Upvotes: 4