See here:
Cordova devs had this to say just now in Slack:
Don’t update to Android Studio 3.0 or use the latest Android Gradle plugin, it will break your build and Cordova will not compile.
We are working on yet another fix for this issue, and there will be a 6.4.0 release for it soon, but as of right now, stick to the old version of Android Studio
BTW: If you do update your Android Studio and your Android Studio offers to upgrade your Gradle plugin, always say no
Issue for tracking the Cordova changes: [CB-13289] Gradle/Android Plugin DSL change breaks including CordovaLib - ASF JIRA
So who updates anyway and tells us how it breaks?
1 Like
Sounds like the perfect upgrade for me. I’m always looking for a good excuse to not work hahaha
1 Like
vasind
October 30, 2017, 4:52am
3
I updated to Android Studio 3.0 and as expected build fails with CordovaLib. Then i followed the steps mentioned in https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html and able to solve the issues right away.
dependencies {
compile fileTree(dir: ‘libs’, include: ‘*.jar’)
// SUB-PROJECT DEPENDENCIES START
“I commented out the below lines as mentioned in the post”
//debugCompile(project(path: “CordovaLib”, configuration: “debug”))
//releaseCompile(project(path: “CordovaLib”, configuration: “release”))
implementation project(':CordovaLib')
compile "com.android.support:support-v13:25.1.0"
compile "me.leolin:ShortcutBadger:1.1.17@aar"
compile "com.google.firebase:firebase-messaging:11.0.1"
// SUB-PROJECT DEPENDENCIES END
}
1 Like
Good work! Ever since I updated earlier this week, this problem has been plaguing me. I really appreciate this. @vasind
Sujan12
November 17, 2017, 9:00pm
5
cordova-android 6.4.0 fixed that by the way and works with the current Android tooling.
1 Like
vasind
November 18, 2017, 9:26am
6
@Sujan12 Yes. after updating it works as expected with Android Studio 3.0. Thanks for the information.
2 Likes
I upgraded this week to cordova-android@6.4.0
and android studio 3.0
.
Furthermore to these, I had then to install a local gradle
and everything went fine.
Could confirm build of my app still works (inclusive --prod --release) and that the features still work as excepted (did a full manual test of my app)
1 Like
peterp
November 19, 2017, 2:18am
8
How can I upgrade to this version? I tried ionic cordvoa platform update android
and it says: “Android project updated with cordova-android@6.1.2”
1 Like
@peterp when it goes to cordova, at least, if you wish to use the latest release, I think you should add @latest
to your cmd
ionic cordova platform update android@latest
or you could specify the version you would like to use, like displayed in the release notes https://cordova.apache.org/announcements/2017/11/09/android-release.html
ionic cordova platform update android@6.4.0
3 Likes