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 Build an Interactive Story App (Retired) User Input Creating the Project

unsupported version of android gradle plug in

I am at the video: Build an Interactice Story App what i had done: downloaded the teacher project imported the project downloaded what ever android studio was asking me then click next when android studio try to open the project this is the message that shows:

Failed to sync Cradle project ´InteractiveStory´ Error:The project is using an unsupported version of the Android Gradle plug-in (0.12.2). The recommended version is 2.2.0. <a href="fixGradleElements">Fix plugin version and sync project</a>

5 Answers

Seth Kroger
Seth Kroger
56,413 Points

I took a look at the build.gradle (app) file in the project download. It uses an obsolete command runProguard which can cause an error. Change it to minifyEnabled. Also make sure the version for the plugin in build.gradle (Project) is the suggested 2.2.0. Then re-sync Gradle.

^^ sorry to bother you but i am a noob on android studio how to do that?? and yes everything is from the teachers notes also the current version of android studio is 2.2

Seth Kroger
Seth Kroger
56,413 Points

In the pane on the left side with the Project files. With the tab at the top on Android (the default) there is a section called "Gradle Scripts" and there are two build.gradle files listed there. One labeled "Module: app" and the other labeled "Project: project-name". You can open both to edit them.

Seth Kroger
Seth Kroger
56,413 Points

The "Fix plugin version and sync project" should be a clickable auto-fix link. Go ahead and click it. It should automatically update the project for the latest tools.

Did it twice did not work :(

Seth Kroger
Seth Kroger
56,413 Points

Did you also download the Android Studio bundle from the teacher's notes and not the Android Dev site? If so I highly recommend uninstalling and installing the version at https://developer.android.com/studio/index.html then starting a new project from scratch (with an Empty Activity, not Blank/Basic). That AS bundle in the notes is really out of date.

i am on Ubuntu 16.04 LTS X64 and Android Studio 2.2 with the latest update so far :p

Appreciated!

cheers