I am following this tutorial :
https://github.com/playgameservices/android-basic-samples#if-youre-using-android-studio
But whenever I do import project I get following window and it hangs.
How can I fix this ?
I encountered similar issue. Please check the system Environment Variable of your PC, the JAVA_HOME path should be set correctly according to Java installed in your PC; something like this in my PC "C:\Program Files\Java\jdk1.8.0_172"
This resolved the issue for me.
Cheers!
Herbs
you can go through the given link and u will get a correct direction on this. if u want to import an android studio project(not other IDE like eclipse..) , don't try to import just open it in android studio and Sync using gradle sync button. The link is only help to import other IDE project into android studio.
Import projects in android studio
Related
I am trying to import my Android project from my pc with windows to my mac ( OSX ) and I get the following error when the project is gradlleing:
So, do you have any idea why is that? I can import projects from Mac to my Windows but when I do from my Windows to Mac I get this error....
Thank you for your time and help!
Open the file and check if you have something like this:
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
If not just add the above to the end of the file.
I was trying to pull a GitHub project into Android Studio and it get struck while proceeding through import project from gradle with default settings and takes infinite time to load.
Here are a re few things to try:
There are several settings you can change in the AndroidStudio repo import function. Try changing the settings on the gradle import.
If you can't get the Android Studio import to work, try using another way to pull your project. You can use the command line or SourceTree. Once you have made a local copy, you can open the project with Android Studio. That has worked for me in the past.
The error is "The patch c:\android-sdk-windows does not belong to a directory.Android studio will use this Andriod SDK instead C:\Users\username\AppData\Local\Android\sdk' and will modify the project's local.properties file.
I am getting the following error when I am trying to import an android sdk project in Android studio
You don't have any problems. Just press ok and then set correct path of Android SDK if needed.
I get the following error when trying to import my project into Android Studio. I have tried to update everything in eclipse before exporting and also in android studio (2.10). I can create a new android project, just have not been able to import it! any pointers in the right direction would be helpful. Also, I'm not that familiar with the Android studio IDE log and have not been able to get any useful information from it.
Thanks!
To correct this problem I started with a fresh instal of both Android Studio and and Eclipse. I was then able to export and then import the project.
I seem to have botched up something in Eclipse. It isn't recognizing any of the libraries that I am trying to import.
Here are some of the things not being recognized:
import java.util.ArrayList;
import android.content.Intent;
import com.google.android.maps.MapView;
This is a open source project that I downloaded and then imported into Eclipse. I think I also downloaded the google apis the wrong way because things like MapView don't work in my other projects as well. Can someone please help me out?
Best,
Aneem
EDIT:
Fixed, most of the issues. Did it by hovering mouse to import line and clicking "Fix project setup..."
Now the only thing I have to do is get the google map related API to work.
To check if you have properly installed ADT
goto -> Window -> Preferences.
If you see Android (in the preferences), it means you have ADT installed.
To point to the valid SDK directory, click on Android. Specify the location in the SDK location.
Even if you have correctly installed ADT and SDK, there is a chance that eclipse may not recognize as the Android project if you import it(depends on the project & files).
Best thing is, to create a new Android project and copy the files from the imported project to the newly created Android project. This will definitely work.
Two things to consider:
Open project properties -> Android section, see if Android SDK is selected or not. if no SDK is selected just check it.
In project properties -> Java Compiler section, change "Compiler compliance level" to "1.6". This is because you have installed JDK 1.7 that has some problems with some packages!
Most likely your ADT plugin is not pointing to the Android SDK. Follow the instructions for installing and configuring the plugin:
http://developer.android.com/sdk/eclipse-adt.html
I right clicked on the project and selected properties and added Google APIs 2.3.3 as the target and did a project->clean and was able to launch the application. Many thanks.