Beginning RecyclerView - Part 2: The Starter | Ray Wenderlich Videos

Download the starter app and build it in Android Studio, and take a peek at the included starter layout files.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4568-beginning-recyclerview/lessons/2

Hi. I opened this downloaded project file and it says some horrifying error messages I cannot fix now…

ERROR: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.0 and higher.
The following dependencies do not satisfy the required version:
root project ‘start’ → org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.30

I think two Kotlin versions of the starter project and my android studio are different and it causes some error when it is compiling. Do you have any idea to fix this issue?

Actually I had the same issue with other Kotlin Tutorial’s starter project files, too. I need to fix this problem to continue my Android studies.

Thanks!

Hi @jjeui0308 thanks for the question. This is a not uncommon issue that occurs when using newer versions of Android Studio and opening projects that were created in earlier versions, like the projects for this course.

When you open the project in Android Studio 3.3, which it sounds like you are using, you are prompted to Update the Gradle plugin version to 3.3.0, and also often the version of the Gradle Wrapper. So those happen automatically.

What this error is telling you is that you also need to update the version of Kotlin being used in the project, since the Gradle plugin 3.3.0 used in Android Studio 3.3 needs to use Kotlin 1.3.0 or later. That change of the Kotlin version typically does not happen automatically.

To fix this, go to the build.gradle file in the root of the project, and change the Kotlin version to 1.3.0 or later. This Kotlin version should also match the version of the Kotlin plugin you have setup in Android Studio, which you can check by going into Settings then Plugins and searching for Kotlin. After updating the build.gradle Kotlin version, sync Gradle files, and you should be good to go.

This seems like a lot to change, but you will get used to updating the Gradle plugin and Kotlin version over time as you work on projects that last across multiple versions of Android Studio and Kotlin releases.

I hope this helps and thanks again for the question!

I’m using Android Studio 4.0. I’m getting two different downloads from the Download button at the top (1-002-the-starter-app) and bottom (1-003-basic-recyclerview) of the course screen. Neither one works when uploaded to Android Studio. neither has anything in it resembling Creature Starter.

Hi @larry_kerschner, thanks for the question!

I just checked the two Download buttons and both gave me the 1-002-the-starter-app download. I then was able to open the project up in Android Studio 4.0.1 and run the creatures app. Be sure to select the “starter” folder when opening in Android Studio.

Also, you may want to avoid hitting “Update” if you see a popup that prompts you to update the Android Gradle Plugin version. This course is relatively old and the code works best with the version of the AGP that the code was developed with. You can re-download the zip file and try again and not hit that button, and the app should then work just fine.

Note that we have an updated version of this course coming out in mid-August that will have the code updated to work with newer versions of the libraries.

Thanks again for your question!

Thanks so much! All good now and I avoided the Update. App runs and works on simulator as advertised.

Larry