Question

Way back when Android Studio first came out (version 0.1) I imported my Eclipse project and have been using Android Studio ever since. I have never created a gradle file and still do not have a gradle file. Along the way I've updated Android Studio almost every week; I'm now using Android Studio 0.3.6. Yesterday I added Android Annotations to my project and now I have a build error that I can't figure out and want to dig into the build system to better understand the problem. Since I have no gradle file what build system is Android Studio running?

Edit: Below is the build error I am getting after adding Android Annotations to the project. The build error baffles me because the directory containing the generated AboutFragment_ java file is included in the Module's settings

java: /source/IG-Android/src/com/agilysys/igmobile/IGMApplicationModule.java:66: cannot find symbol
symbol  : class AboutFragment_
location: package com.agilysys.igmobile.ui.settings
Was it helpful?

Solution

If you don't have Gradle build files (which as you've found out is what happens if you import an Eclipse project directly into Android Studio), then it's using IntelliJ's builder; it will work the same as if you were using IntelliJ 12 with your project (and in fact you can open your project there and it should work just fine, though you won't pick up the improvements made to the Android plugin without Android Studio or the upcoming IntelliJ 13).

At the moment, if you want to take an existing Eclipse project and use it in Android Studio with a Gradle build file, the recommendation is to go into Eclipse and export it to Gradle, and then import that Gradle-based project in Android Studio. Or, if you want to convert your existing project, you could write a Gradle buildfile for it by hand.

I realize this is confusing, and it's on our roadmap to provide direct Eclipse import to Gradle (https://code.google.com/p/android/issues/detail?id=61878) and a migration path for existing IntelliJ projects to Gradle (https://code.google.com/p/android/issues/detail?id=61879)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top