I am in the process of migrating my current project from eclipse to studio which is present on github.
My project makes use of google play services lib and an another library (calendar lib to be precise)
I tried many ways of migrating to studio following the tutorials on the net but I am not able to achieve it.
I am getting problem with my Google play service library. The error is cannot find resource #integer/google_play_services_version
At this point of time I confused don't know Wat to do. Can some please tell me proper way of migrating.
It will be of great help. Thanks in advance :)
You are seeing the error in Android Studio? This should not be the case, as Android studio handles libraries through gradle dependancies. You can check your build.gradle for the dependencies. If you are seeing this error, I assume it is in Eclipse, which the link #SurajPalwe13 provided should help fix.
Migrating from Eclipse to Android Studio should be as easy as Importing the Eclipse project into Android Studio.
In Android Studio, File > Import > Select Eclipse project directory. Then a import wizard should come up.
Alternatively, you can export your Eclipse Project to contain gradle files:
In the latest version of Eclipse, Right Click Project > Export > Android > Gradle. Then follow through the export wizard. You should then be able to import the build.gradle file in Android Studio.
Related
When I import a downloaded project, I get this message:
Migrate Project to Gradle?
This project does not use the Gradle build system. We recommend that you migrate to using the Gradle build system.
More Information about migrating to Gradle
Don't show this message again.
How to make the android project using gradle build system?
Go to the Welcome Screen of Android Studio (If you are in a project: File->Close Project).
There is a button "Import project (Eclipse ADT, Gradle, etc.)", press it.
From here on out, the wizard will guide you, but I'll describe them here too:
Select your project folder.
Enter your new project path.
Check all boxes.
There are many guides for migrating to Android Studio out there (for example by Google themselves).
There is no enough reputation for me to post a image so I have to describe it by words...
Open the Android Studio and change View from Android to Project there will be 2 child-folders, one is named by your project-name, the other is External Libraries.
There should be SDK and JDK or some support-libraries in it but now nothing!
The problem occured only when I tried to import an exsiting project.
So how to fix it?
Because, Migrating from Eclipse ADT to Android Studio requires adapting to a new project structure, build system, and IDE functionality. To simplify the migration process, Android Studio provides an import tool so you can quickly transition your Eclipse ADT workspaces and Ant build scripts to Android Studio projects and Gradle-based build files. For your reference check this link, Migrating to Android Studio Or for steps to do it check this link, Steps
I set up git in Android Studio
http://maxrohde.com/2014/08/18/import-github-project-to-android-studio/
Then imported this project
https://github.com/GautamGupta/Simple-Android-OCR
The following error was displayed:
Migrate Project to Gradle?
This project does not use the Gradle build system. We recommend that you migrate to using the Gradle build system.
What can I do to fix this?
That project hasn't been modified in two years, really four for most of the project, so it uses the older project layout and was very likely developed using Eclipse rather than Android Studio.
Here is the Google reference for migrating a project from Eclipse to Android Studio:
https://developer.android.com/sdk/installing/migrate.html
An option if simply importing doesn't work is to install Eclipse and do an export from there to Android Studio. While you could just work in Eclipse it is deprecated for Android development and you'll find many more up-to-date resources for Android Studio.
How do you import an Eclipse project into Android Studio now?
Android Studio's default build system is Gradle. That GiftHub project is not using Gradle build system. Probably created from Eclipse (Ant build system)
So when you open a project that does not use Gradle build in Android Studio, it will ask to convert the Project to Gradle based build. You just give yes on the popup, it will take care of everything.
http://gaut.am/making-an-ocr-android-app-using-tesseract/#comment-184181
here it explains solutions for gradle errors
That's not an error!
The recommended build system for android projects is gradle.
But the author of this project in github did it using only eclipse without any special build system.
You just need to answer "yes" to that popup message and Android studio will convert the project to use gradle
I'm trying to migrate from using Eclipse for my Android-project to the new Android Studio, and I'm having an issue related to Gradle.
What I want is for me to push the latest Eclipse-build to Github, and then be able to pull it down in Android Studio, having the latter automatically convert the project to a Gradle-build. If I'm reading the documentation right, the Android Studio import is supposedly able to do this.
When importing, I can choose between "Create project from exisiting sources" or "Import project from external model"
If I choose the first option, the project won't use Gradle (as far as I can see). If I choose the second, it seems to be looking for an already existing gradle buildfile "build.gradle" in my project.
So - Should I download a Gradle-plugin to Eclipse and make a gradle build-file there, or am I doing something wrong in the import?
It seems the only other questions I can find on SO is about importing and Eclipse export or simply how to pull a project from Github in Android Studio.
Thanks :-)
Importing and converting an existing Eclipse project into a Android Studio Gradle project is quite simple :
File -> Import Project (in Android Studio)
Select the manifest of your Eclipse Android project.
Done.
There may be some dependacy management to deal with.
You can also take a look here :
How do you import an Eclipse project into Android Studio now?
How about this:
clone repo to location 1
export from eclipse
import to android studio in location 2
copy the .hg files or whatever's applicable from 1 to 2
commit from location 2 including deleting eclipse files
Now the repo will have the android studio project and not eclipse.
I get Android project from Eclipse, and I can import it to my Android Studio. I read all instructions about it... first step is export this project from eclipse. But I dont have eclipse and I cant install it.
Can I import this project without Eclipse?
Thanks a lot.
The documentation at the developer site says:
Note: It's possible to import an existing Android project to Android
Studio even if you don't generate a Gradle build file from
Eclipse—Android Studio will successfully build and run projects using
an existing Ant build file. However, in order to take advantage of
build variants and other advanced features in the future, we strongly
suggest that you generate a Gradle build file using the ADT plugin or
write your own Gradle build file for use with Android Studio. For more
information about the Gradle build system, see the Gradle Plugin User
Guide.