Error: resource string/fb_app_name (aka string/fb_app_name) not found


#1

Trying to package a build (that works fine locally on my machine) via the ionic pro dashboard and I’m getting this error in the build.

BUILD FAILED in 2m 16s
:app:createReleaseCompatibleScreenManifests
:app:processReleaseManifest
:app:splitsDiscoveryTaskRelease
:app:processReleaseResources FAILED
25 actionable tasks: 25 executed
Error: /usr/src/app/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/usr/src/app/platforms/android/app/build/intermediates/manifests/full/release/AndroidManifest.xml:81: AAPT: error: resource string/fb_app_id (aka adroitcode.discgolflife:string/fb_app_id) not found.
    
/usr/src/app/platforms/android/app/build/intermediates/manifests/full/release/AndroidManifest.xml:84: AAPT: error: resource string/fb_app_name (aka adroitcode.discgolflife:string/fb_app_name) not found.
    
/usr/src/app/platforms/android/app/build/intermediates/manifests/full/release/AndroidManifest.xml:88: AAPT: error: resource string/fb_app_name (aka adroitcode.discgolflife:string/fb_app_name) not found.
    
/usr/src/app/platforms/android/app/build/intermediates/manifests/full/release/AndroidManifest.xml:81: error: resource string/fb_app_id (aka adroitcode.discgolflife:string/fb_app_id) not found.
/usr/src/app/platforms/android/app/build/intermediates/manifests/full/release/AndroidManifest.xml:84: error: resource string/fb_app_name (aka adroitcode.discgolflife:string/fb_app_name) not found.
/usr/src/app/platforms/android/app/build/intermediates/manifests/full/release/AndroidManifest.xml:88: error: resource string/fb_app_name (aka adroitcode.discgolflife:string/fb_app_name) not found.
error: failed processing manifest.

Thus far I’ve tried:

  • renaming APP_ID and APP_NAME to FB_APP_NAME etc in config.xml
  • removing and adding the plugin via the cli.

Neither have worked.

Any suggestions?


#2

I have also tried adding a config section to the android platform section as described in the android guide for the plugin here

<config-file parent="/resources" target="./res/values/strings.xml">
    <string name="fb_app_id">123456789</string>
    <string name="fb_app_name">myApplication</string>
</config-file>

In all cases I can get this build working locally (win 10) but it is failing during the remote packaging. I’ll have burned through my monthly quota very soon. There has got to be a better way to do this than guess and check… ?


#3

Root cause ended up being that Ionic Pro packaging does not support latest version of Cordova-Android See Here


#4

The easiest solution is to

Add string resources into (I am using linux ubuntu this is my ionic project path) file : /home/user/js/fb4/platforms/android/app/src/main/res/values/strings.xml

<string name="fb_app_id">59523234234</string>
<string name="fb_app_name">hajmo.ba</string>

and my project now works!

As mentioned here