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 trialOzgur Canibeyaz
3,126 Pointsandroid development environment
Setting up the development environment is actually harder than coding in java. When i import the project to eclipse i get tons of error. I had no choice but start from scratch . Then i decided i should try android studio which made things even worse. Right after creating a new project i get a gradle sync issue which i couldnt solve. I also cannot instantiate a textview object by calling the findbyview method. R.id.textviewname doesnt work.
14 Answers
Alessandro Calorì
10,241 PointsCan you please elaborate on what is your exact problem?
Ozgur Canibeyaz
3,126 Pointssorry i thought it was clear enough. Right after launching the android studio, i get an error saying that gradle sync failed. i tried every recommended solution but no dice. If i ignore the error and continue my project i get other errors too. I tried installing the AS on a windows machine and have had no problems so far.
Alessandro Calorì
10,241 PointsUhm, ok. So you're using something else than Windows? MacOS X? Linux?
Ozgur Canibeyaz
3,126 PointsI am on a mac running os x maverics .
Alessandro Calorì
10,241 PointsKeep in mind that IntelliJ IDEA and Android Studio store library's directory reference in their configuration so it is possible that you are try to refer Windows paths on MacOS X. Try to delete IDEA configuration file (*.iml) and directory (.idea) and import the code into a new project. Also take a look at the project settings (CTRL + ALT + S on Windows) at the SDK directories for Java and Android.
Ozgur Canibeyaz
3,126 PointsSorry dont follow. I dont have any prior intellij idea installation. I am starting from scratch anyway. Install android studio create new project and get this error.
Ozgur Canibeyaz
3,126 PointsI believe i might have failed to elaborate the issue clearly. Forget about importing problem. That happens on eclipse. Android studio is what i would like to use but cant.
Alessandro Calorì
10,241 PointsOk, if you want to import an Eclipse ADT project in Android Studio there is a rather clear guide on Android Developer.
BUT, before that you have to configure Android Studio correctly installing tha Java Development Kit and Android SDK. Did you do that?
Ozgur Canibeyaz
3,126 PointsThats what my problem is. I could install JDK and the SDK but i am receiving an error about gradle sync.
Alessandro Calorì
10,241 PointsWhat does Android Studio displays in the "Message" toolbox? Does it give some specific error or just a "Gradle Sync Failed"? It's too generic and usually it means that it cannot find either the Java Dev Kit or the Android SDK. It can be also related to installation issues: did you installed the Support Library AND the Support Repository from the Android SDK Manager?
Ozgur Canibeyaz
3,126 PointsThe message toolbox says unable to open zip file. thats all . I installed the support library and repository from the SDK manager
Alessandro Calorì
10,241 PointsOk. Try with these steps:
- Invalidate IDE cache (File->Invalidate cache) and close Android Studio
- Delete .gradle (watch the leading dot) folder from your project
- Try again to open the project and rebuild
Ozgur Canibeyaz
3,126 PointsAlready did that. However i cant find the .gradie folder.
Alessandro Calorì
10,241 PointsCan you take a look at your Gradle setting? It should look like this: