问题
I've updated the cordova-plugin-print (by katzer)to v0.8.0 but it fails when building with PhoneGap Build. It throws this error
Error - A plugin you are using requires a preference: ANDROID_SUPPORT_V4_VERSION
Where: Build file '/var/gimlet/tmp/47255016036300/3460831/project/build.gradle' line: 276
What went wrong: A problem occurred evaluating root project 'project'.
Could not get unknown property 'ANDROID_SUPPORT_V4_VERSION' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Is anyone willing to help?
回答1:
Your question is missing stack trace and other details. However, the plugin
cordova-plugin-x-socialsharing
has an issue and fails with:
FAILURE: Build failed with an exception.
* Where:
Build file '/home/mj/projects/benara-sales-client/platforms/android/build.gradle' line: 266
* What went wrong:
A problem occurred evaluating root project 'android'.
> Could not get unknown property 'ANDROID_SUPPORT_V4_VERSION' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
To fix, you may install v5.4.0
so remove the plugin and the correct version
cordova plugin rm cordova-plugin-x-social-sharing
cordova plugin add cordova-plugin-x-social-sharing@5.4.0
Hope this helps.
来源:https://stackoverflow.com/questions/56305672/build-fails-on-pgb-with-error-a-plugin-you-are-using-requires-a-preference-an