build fails on PGB with Error - A plugin you are using requires a preference: ANDROID_SUPPORT_V4_VERSION

风流意气都作罢 提交于 2019-12-13 04:27:55

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!