The External Libraries missed when Importing a new project into AndroidStudio - android

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

Related

importing github project into android studio

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

How can I tell which IDE an Android project was made with?

For example this project. I see it has Gradle files, but a quick search says Eclipse has a Gradle plugin as well.
https://github.com/sephiroth74/HorizontalVariableListView
The Android build system is built on top of gradle:
https://developer.android.com/tools/building/plugin-for-gradle.html
So that means that just plain gradle is not enough to build an Android project.
As ADT never used gradle and Google has ended Eclipse support, you can be reasonably confident that an Android gradle project was made using Android Studio.
Gradle is a building tool. It has plugins for Eclipse, IntelliJ, Android Studio and Netbeans. So you won't be able to tell which IDE an Android project is made with from just a gradle file. Some project structures vary, for Eclipse projects and IntelliJ ones, you can find easily differences between them if you are familiar with both. But some are not explicitly, for IntelliJ projects and Android Studio ones.
BTW, do IDEs matter? The App you are building does, I am afraid.
Android Studio, which is developed based on IntelliJ. It uses gradle to build the project.
If a project contains .classpath or .project, it should be made by Eclipse. Or it should be made by android studio. A project made by android studio can not be imported into eclipse.

Migrating eclipse project from github to android studio

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.

Importing and converting Eclipse-made Android project from Github to Android Studio Gradle-build

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.

Migrating Android apps from Eclipse to Android Studio with multiple user-created libraries and dependencies

How can you migrate to Android Studio using an Eclipse project depending one many user libraries?
I've tried using the Eclipse export to gradle but I can't seem to get it to work.
Also, my project sources are not in the workspace.
As of Android Studio 0.4.2, you can now import the Eclipse project from Android Studio.
Note: This is different from Eclipse's export Gradle project function.
Open Android Studio
Verify the version is >0.4.2, if not update to it. (I had to download it from the tools website)
Import Project...
Navigate to the actual Android app project, the highest level project (not the workspace or the directory containing all the eclipse projects)
Follow the wizard to import it all
The advantages of doing it this was is that :
makes the migration less painful
generates gradle files
restructures your project as a gradle/Android Studio project

Categories

Resources