Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Cannot work on Android Studio course after update

So a few months ago I started working on Android basics with the How to Build a Simple Android App course. I've been busy with other things this year and I haven't really touched the course since April, around the time the project still worked on Android Studio because Android Studio was in beta. Since then, Android Studio has made leaps and bounds and I unfortunately upgraded to those leaps and bounds. After importing the FunFacts project, it stopped working and started giving me these errors:

Error:Invalid Gradle JDK configuration found. -- Open Gradle Settings Project JDK is not specified - Open SDK Configuration

I tried recreating the project and using API 14 to match what was in the course, and it still gives me the same stuff every time. I can't work on the project. Has anyone managed to work on the project after upgrading to version 1.4 and can help me? Or should I just accept the fact that the course is outdated and start looking for a new one? I really want to continue this course and eventually get into the fun stuff with APIs, and I can't do that if I can't work on the project. Can anyone help me?

Thank you so much! :)

EDIT: I also tried installing this project off of a clean Android Studio install on my MacBook, and I got the same errors. Is this project just not compatible with the newer versions of Android Studio?

1 Answer

Well, I fixed it for myself. The problem was not with the course, but with Android Studio and Gradle.

The first thing I did was head over to build.gradle, and found out that runProguard() was deprecated after Android Studio version 1.0. I replaced runProguard() to minifyEnabled false. Then, I was still getting an error involving a plugin, so I deleted the line that said apply-plugin: java, and everything worked! I'm so glad I can continue learning again :)