Reputation: 31
I had imported a project from eclipse to android studio. I followed the instructions how to export by generating a gradle from eclipse. As expected, things didn't go smoothly when importing it into android studio. I have encountered this error in my gradle.
Error : (1,0) Plugin with id 'com.android.application' not found.
Then I entered this command in the terminal: ant -debug
. I found that JAVA_HOME is not defined correctly. I found out it was about gradle. I checked my gradle with gradle -v but gradle was not available. I solved it by creating a symbolic link and solved the problem.
------------------------------------------------------------
Gradle 1.4
------------------------------------------------------------
Gradle build time: Monday, September 9, 2013 8:44:25 PM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.9.3 compiled on April 8 2014
Ivy: non official version
JVM: 1.7.0_67 (Oracle Corporation 24.65-b04)
OS: Linux 3.13.0-36-generic amd64
So, I tried ant -debug again
and got this error:
JAVA_HOME is not defined correctly.
We cannot execute /usr/local/java/jre1.7.0_45/bin/java
echo $JAVA_HOME
gave me this /usr/local/java/jre1.7.0_45
I checked my /etc/environment
with the following result:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
How do I solve this? I tried many solutions, none of them worked. I already spent a day working this out. Any advice would be appreciated. If you need additional info, just tell me.
Upvotes: 1
Views: 278
Reputation: 31
This problem was solved. I tried a different approach in migrating my project to the android studio.
I did not follow the steps in the android developer's site.
I imported it without generating **gradle from eclipse**.
I made a copy of my project from eclipse and imported it using the import project in android studio it automatically generated its own gradle and included the libraries I used in eclipse. It took a while but it worked.
Upvotes: 1