FacebookConnect build issue PGB

  • 1
  • Problem
  • Updated 4 years ago
Hello,

Last time I build on PGB with the same config.xml it was working well, now it doesn't.

It looks like I have an issue on this part (when I remove it, it works) :

<gap:plugin name="com.phonegap.plugins.facebookconnect" version="0.9.0" >
<param name="APP_ID" value="xxxxxxxxxx" />
<param name="APP_NAME" value="xxxxxxxxxx" />
</gap:plugin>


I use this as well :

<preference name='phonegap-version' value='cli-5.4.1' />
<preference name="android-build-tool" value="gradle" />
<preference name="orientation" value="portrait" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="false" />
<preference name="stay-in-webview" value="true" />
<preference name="deployment-target" value="7.0" />
<preference name="android-windowSoftInputMode" value="adjustResize" />

<gap:plugin name="cordova-plugin-camera" source="npm" />
<gap:plugin name="cordova-plugin-device" source="npm" />
<gap:plugin name="cordova-plugin-device-motion" source="npm" />
<gap:plugin name="cordova-plugin-device-orientation" source="npm" />
<gap:plugin name="cordova-plugin-file" source="npm" />
<gap:plugin name="cordova-plugin-file-transfer" source="npm" />
<gap:plugin name="cordova-plugin-geolocation" source="npm" />
<gap:plugin name="cordova-plugin-network-information" source="npm" />
<gap:plugin name="cordova-plugin-splashscreen" source="npm" />
<gap:plugin name="cordova-plugin-vibration" source="npm" />
<gap:plugin name="cordova-plugin-dialogs" source="npm" />
<gap:plugin name="cordova-plugin-media" source="npm" />
<gap:plugin name="cordova-plugin-globalization" source="npm" />
<gap:plugin name="cordova-plugin-inappbrowser" source="npm" />
<gap:plugin name="cordova-plugin-statusbar" source="npm" />
<gap:plugin name="com.phonegap.plugins.facebookconnect" version="0.9.0" >
<param name="APP_ID" value="xxxxxxxxxx" />
<param name="APP_NAME" value="xxxxxxxxxx" />
</gap:plugin>
<gap:config-file platform="ios" parent="LSApplicationQueriesSchemes" overwrite="true">
<array>
<string>fbapi</string>
<string>fbapi20130214</string>
<string>fbapi20130410</string>
<string>fbapi20130702</string>
<string>fbapi20131010</string>
<string>fbapi20131219</string>
<string>fbapi20140410</string>
<string>fbapi20140116</string>
<string>fbapi20150313</string>
<string>fbapi20150629</string>
<string>fbauth</string>
<string>fbauth2</string>
<string>fb-messenger-api20140430</string>
</array>
</gap:config-file>
<gap:plugin name="cordova-plugin-x-socialsharing" source="npm" />
<gap:plugin name="cordova-plugin-contacts" source="npm" />
<gap:plugin name="com.cordova.plugins.sms" version="0.1.2" />
<gap:plugin name="cordova-plugin-whitelist" source="npm" />
<gap:plugin name="cordova-plugin-keyboard-ams" source="npm" />
<gap:plugin name="cordova-admob" source="npm"/>


I have this issue on build logs :

:processReleaseManifest
:processReleaseResources/project/build/intermediates/res/release/values-v23/values.xml:5: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.

/project/build/intermediates/res/release/values-v23/values.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processReleaseResources'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/android-sdk/build-tools/23.0.1/aapt package -f --no-crunch -I /android-sdk/platforms/android-22/android.jar -M /project/build/intermediates/manifests/full/release/AndroidManifest.xml -S /project/build/intermediates/res/release -A /project/build/intermediates/assets/release -m -J /project/build/generated/source/r/release -F /project/build/intermediates/res/resources-release.ap_ --custom-package com.linkycrush.LinkyCrush -0 apk --output-text-symbols /project/build/intermediates/symbols/release
Error Code:
1
Output:
/project/build/intermediates/res/release/values-v23/values.xml:5: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.

/project/build/intermediates/res/release/values-v23/values.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 15.3 secs

/project/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /project/gradlew with args: cdvBuildRelease,-b,/project/build.gradle,-Dorg.gradle.daemon=true,-PcdvBuildMultipleApks=false


Do you have any idea of what is wrong?
Photo of GuillaumeT

GuillaumeT

  • 37 Posts
  • 1 Reply Like

Posted 4 years ago

  • 1
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
That's an old plugin.
You could try https://www.npmjs.com/package/cordova... with androidMinSDK>14
Photo of GuillaumeT

GuillaumeT

  • 37 Posts
  • 1 Reply Like
Hello Petra, Thank you for you answer. I have this error when I try to build on PGB :

Error - The minSdkVersion as specified in your config.xml (or the default value of 14) is less than required by a library included in your application: com.facebook - You can fix this

Maybe I did something wrong? Below the modification I've done:


<preference name="android-minSdkVersion" value="14" />

<gap:plugin spec="https://github.com/jeduan/cordova-plugin-facebook4#aff9a08a86cc6c6a18019f7adc2896ddf97c11cd" source="git" >
<param name="APP_ID" value="xxxxxxxxxx" />
<param name="APP_NAME" value="xxxxxxxxxx" />
</gap:plugin>
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Yes, that's why I wrote you should use a value greater than 14
Photo of GuillaumeT

GuillaumeT

  • 37 Posts
  • 1 Reply Like
Yes, you are right...Sorry for this mistake.
I changed 14 by 15 but still have the same issue in build logs :
processReleaseManifest
:processReleaseResources/project/build/intermediates/res/release/values-v23/values.xml:5: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.

/project/build/intermediates/res/release/values-v23/values.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processReleaseResources'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/android-sdk/build-tools/23.0.1/aapt package -f --no-crunch -I /android-sdk/platforms/android-22/android.jar -M /project/build/intermediates/manifests/full/release/AndroidManifest.xml -S /project/build/intermediates/res/release -A /project/build/intermediates/assets/release -m -J /project/build/generated/source/r/release -F /project/build/intermediates/res/resources-release.ap_ --custom-package com.linkycrush.LinkyCrush -0 apk --output-text-symbols /project/build/intermediates/symbols/release
Error Code:
1
Output:
/project/build/intermediates/res/release/values-v23/values.xml:5: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.

/project/build/intermediates/res/release/values-v23/values.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 11.225 secs

/project/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /project/gradlew with args: cdvBuildRelease,-b,/project/build.gradle,-Dorg.gradle.daemon=true,-PcdvBuildMultipleApks=false
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Not quite sure. You might try building once using PGB cli-6.1.0 and see if it builds correctly.
If not, something might be wrong in your package, for instance the directory structure. Should your zip file be available online somewhere, please post its url and I'll be happy to have a look.
Photo of GuillaumeT

GuillaumeT

  • 37 Posts
  • 1 Reply Like
Thank you for your piece of advice!

Indeed, it work with PGB cli-6.1.0. I didn't want to go further than 5.4.1 as I did have issues on 6.0.0 on IOS app build and the answer that I had is "cli.6.0.0 is expermentatial the default remains cli-5.2.0"

Anyway, I have a look if everything is fine in my app (hopefully :))