Google released Android Studio 3.0, you should probably NOT upgrade yet (as Cordova is not ready yet but working on it)


#1

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: https://issues.apache.org/jira/browse/CB-13289

So who updates anyway and tells us how it breaks?


Android build broken after gradle dependencies update: Execution failed for task ':processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt
#2

Sounds like the perfect upgrade for me. I’m always looking for a good excuse to not work hahaha


#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

}


#4

Good work! Ever since I updated earlier this week, this problem has been plaguing me. I really appreciate this. @vasind


#5

cordova-android 6.4.0 fixed that by the way and works with the current Android tooling.


#6

@Sujan12 Yes. after updating it works as expected with Android Studio 3.0. Thanks for the information.


#7

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)


#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”


#9

@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