Replies: 1 comment
-
moving to discussions since looks like it's not a capacitor issue but some problem on azure devOps |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone
I'm building an ionic project with jeduan/cordova-plugin-facebook4 cordova plugin, have included my facebook id and app name in the app/src/main/res/values/strings.xml like so:
<?xml version="1.0" encoding="UTF-8"?> <resources> <string name="app_name">UI</string> <string name="title_activity_main">UI</string> <string name="package_name">[redacted]</string> <string name="custom_url_scheme">[redacted]</string> <string name="fb_app_id">[redacted]</string> <string name="fb_app_name">UI</string> </resources>
Added the necessary facebook values to app/src/main/AndroidManifest.xml like so:
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/fb_app_id"/> <meta-data android:name="com.facebook.sdk.ApplicationName" android:value="@string/fb_app_name" /> <activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:label="@string/fb_app_name" />
Locally building the app in Android studio works, however i'm building the production app in Azure DevOps using gradle and I keep getting the below error:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed /Users/runner/work/1/s/android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml:6:1-93: AAPT: error: resource string/fb_app_id (aka capacitor.android.plugins:string/fb_app_id) not found. /Users/runner/work/1/s/android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml:7:1-97: AAPT: error: resource string/fb_app_name (aka capacitor.android.plugins:string/fb_app_name) not found. /Users/runner/work/1/s/android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml:8:1-177: AAPT: error: resource string/fb_app_name (aka capacitor.android.plugins:string/fb_app_name) not found.
The strings.xml and AndroidManifest.xml are checked in the branch.
My pipeline tasks:
bash: | npx cap update
task: Gradle@2 displayName: "Build APK using Gradle" inputs: gradleWrapperFile: "android/gradlew" workingDirectory: "android" tasks: "build" publishJUnitResults: false javaHomeOption: "JDKVersion" gradleOptions: "-Xmx3072m" sonarQubeRunAnalysis: false
Beta Was this translation helpful? Give feedback.
All reactions