udacity / ud867

Course code repository for Gradle for Android and Java
https://www.udacity.com/course/gradle-for-android-and-java--ud867
MIT License
668 stars 1.27k forks source link

Error while building Ex3.07-DeclareFlavours in Andriod studio 3.0 #71

Open geekanamika opened 6 years ago

geekanamika commented 6 years ago

Android plugin 3.0.0 and higher include a new dependency mechanism that automatically matches variants when consuming a library. Error:All flavors must now belong to a named flavor dimension. Can i create a pull request by making changes inside build.gradle file ? Resource required : https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html?utm_source=android-studio#variant_aware

dnbit commented 6 years ago

@geekanamika If we update it then the project will not work in Android Studio 2 versions. In order to keep compatibility, in case some student has not updated to Android Studio 3, we decided not to update this for now.

Instead, we have included in the course instructions on how to update this.

Sometimes this bits are tricky. When AS 3 was beta we needed to make sure that everything would work once it reached stable but at the same time we could not drop support for AS 2.

Eventually, we will end up dropping it and updating as you suggest.