-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle version support-v4:+ fetches alpha version causing build errors #1322
Comments
Hi, pinning the support library should fix the problem? I am still getting the same errors, could be more specific please? Thank you very much |
I tried doing your suggestion too, but i still got the same issue. Anything else we can do? |
You need to remove and re-add the Android platform in the test project to rebuild the Gradle config so the changes will be reflected in the native project and the build will succeed. I've updated the "Steps to resolve" to make this explicitly clear. |
Cool it worked, so just need to re-add the platform. Thanks! |
Thanks this worked for me. FYI (just in case) for Phonegap build, fork the repository and make the update, reference your forked version. |
This caused us several hours today. Please make the appropriate 5-character fix, upstream! (cc: @mattblang ) |
That is fixed already. |
@dpa99c The error message is below
On my plugin.xml is below is there any way to fix the problem?? I am using 0.9.0-beta.3 for this library and |
Environment
cordova -v
): 7.0.1cordova platform ls
): 6.2.3Expected Behavior
The plugin will include the latest release version of the Android Support Library, which is compatible with other plugins.
Actual Behavior
The plugin will includes the latest alpha version of the Android Support Library, which is incompatible with other plugins, causing a build failure.
Explanation
This is because of the line in this
plugin.xml
:This causes Gradle to pull in the very latest (bleeding edge) version of the Android Support Library which is currently
26.0.0-alpha1
.However, because it's an alpha, this causes issues with some other plugins, for example see this issue with cordova-plugin-facebook4.
Other plugins have also been suffering from these Gradle version collisions: see phonegap-plugin-barcodescanner#480 and cordova-diagnostic-plugin#212.
Steps to Reproduce
Reproduce by adding the latest version of this plugin along with an
Observe the build succeeds and in the console output is v25.3.1 of Android Support Library:
Observe the build failed and in the console output (see below) is v26.0.0-alpha1 of Android Support Library:
Steps to Resolve
plugins/de.appplant.cordova.plugin.local-notification/plugin.xml
and change<framework src="com.android.support:support-v4:+" value="gradle" />
to<framework src="com.android.support:support-v4:25.+" value="gradle" />
cordova platform rm android && cordova platform add android
cordova compile
Observe that the build succeeds and in the console output is v25.3.1 of Android Support Library:
Debug logs
Android console output for failed build
The text was updated successfully, but these errors were encountered: