Why can't I import google play services into eclipse? - android

I am trying to import the google-play-services_lib into Eclipse but I am not able to import it as I am getting the following warning no projects are found to import. Can anyone suggest a solution to this? Please give step by step instructions as I am a newbie.

You can import android project in two ways,
In your case I suggest you to use 2nd way.
Note, the Android project which doesnt contain .class file, .project file can be import using 2nd option. In all other cases 1st option is better.

Delete project (google_play_services) from SDK Manager then reinstall project (google_play_services) and import.

You should choose option to 'Create project from existing source' from File->New->Android Project

Related

How to add library project to an existing android project in AndroidStudio

how can I add a custom library project (in my example the CuXtomCam library) to an existing android project using Android Studio 1.1?
I've read about changing the build.gradle file. But where should I place the library ressources?
Thank you in advance for all answers and comments!
To import library into Android Studio:
select File > Import, and then select the directory containing the project to import.
a wizard will open and guide you through the rest of the import process.
When the project import has finished, it will open up a file called "import-summary.txt" which lists all the steps taken during import and suggestions for next steps. For example, it may note files that were not migrated, it may note missing components in your SDK install, and so on.
Just right click on the project then New>Module. from the new window select Import existing project. Give the directory. I think this will help

Why i am getting invalid project description while importing project?

I am trying to import an existing project in eclipse. However i am getting this error in the snapshot below.
This problem only exists when i try to import from my workspace. However if the same project is somewhere else, then i am able to import it successfully.
I also faced the same problem. The trick bellow solved my problem:
check the box Copy project into workspace while importing the existing project.
you have two solutions and they works:
1- move your project package from workspace and place it in another root, then import to eclips.
or
2- rename your project package and then add it and it will fix the problem.
you have a project named X in your workspace still you are trying to import another project named X . you can fix it by deleting the existing project in eclipse and retry importing.
Fixes
You can change your workspace and import this project in to the new workspace
delete the project from eclipse and import without using copy project in to workspace
Android -> Existing Android Code Into Workspace, You must use General->Existing projects into workspace. It's probably a solution
You should change workspace path.
For to do Change The Workspace Path:
I have checked all the solution and finded that in most of cases "Changing the Project location" form Workspace worked in 80% cases. But for next 20%,i would recommend to do following:
Change the folder of Project and then Import it. (first do this)
If above does not worked, Rename the Project and then try importing it.
If still you are not getting success,check whether you are importing the project from 1 workspace folder to other or not.IF yes,then while importing the projects,check the option "Copy project into Workspace".
And even if you are not getting success, clik import --> General --> Existing Project into Workspace.
PS --> If this solution worked for you,please vote-up as i am newbie here and hence need that to participate in major questions and answers.

ZXing-2.1 - Missing libraries

EDIT ::: For people who may be searching for a solution, Here it is.. (using ZXing 2.1)
Follow the steps below :::
First you have to import the existing code into your workspace
File -> import -> android -> existing android code into workspace
Browse to the unzipped folder of ZXing 2.1
You will have two projects in the list. Select both and click OK.
They will be imported into your workspace and you will have errors.
For the first Project (CaptureActivity in my case), you have to add the core.jar file present in ZXing2.1\zxing2.1\core
For the second project (ZXingTestActivity in my case), you have to add the core.jar file present in ZXing2.1\zxing2.1\core and android-integration.jar present in ZXing2.1\zxing2.1\android-integration
That's it.. You are done...
Hope this helps...
I have an application where we use ZXing. I have to update the library to the latest one. So I downloaded the code from ZXing-2.1.zip from here. When I try to compile I get errors in the import statements.
import com.google.zxing.BarcodeFormat;
import com.google.zxing.DecodeHintType;
import com.google.zxing.Result;
I couldn't find these libraries anywhere in the zip that I have downloaded. Can someone please guide me on how this is done? What am I doing wrong?
If you have a step by step tutorial, please do link them.
The classes are found in core.jar. You build this from the source code you downloaded.
I suggest you use the latest code from Subversion actually. If you do that, here's how you can get a pre-compiled JAR, or build one yourself: https://code.google.com/p/zxing/wiki/GettingStarted
(We are releasing 2.2 in a week or two by the way.)
Or if you want to build 2.1, see this previous documentation: https://code.google.com/p/zxing/source/browse/wiki/GettingStarted.wiki?spec=svn2659&r=2659
Extract zip
Right click on project-> properties-> Java Build Path-> Libraries-> Add External Jars-> select the jar file where it is in your Pc-> click ok.

Cannot import google-play-services_lib because the project name is in use

I've done an application which displays a Google map referring this tutorial
http://www.vogella.com/articles/AndroidGoogleMaps/article.html
The application has worked fine and it displayed a Google Map as shown in the tutorial. But now, when I open the project, it shows several errors relating to the import of com.google packages. I've already added the google_play_services_lib. But now, that is not shown in the application. When I try to import the google_play_services_lib again, this error appears,
"Cannot import google-play-services_lib because the project name is in
use"
What is the problem? Please help me.
This generally occurs, if you have a project or folder by the same name existing in your workspace.
In general, You can solve it by changing the name of the existing folder using 'F2' shortcut key. But, since this is a library I recommend you to shift the existing folder "google_play_services_lib" from your workspace directory to somewhere else and then again try and import the "google_play_services_lib" .
this means that google-playservices.lib is using by another projects, you can solve it by.
remove the reference to it from the project which is using it.
OR close that project using eclipse->right click->close.
Remove this project from your workspace then import from your sdk place.
[http://developer.android.com/google/play-services/setup.html#Install]
It seems that when you import google-play-services_lib, Eclipse creates a project by the same name. Even though I deleted manually the google-play-services_lib folder from my workspace folder, I also had to delete the google-play-services_lib project in Eclipse as well. After doing it, I was able to import the lib, and then use it in my project.

Unable to import sample project from sdk

I want to study the sample code in android sdk which is cubelivewallpaper..
So i decided to import it. But it has a problem. i am not able to click finish because it is disabled.. here:
and here is i am trying to import.
Anyone can help me how to import sdk project wihout getting this error?
Thank you..
To import sample project follow the following steps:
Click on File ---> New ---> other, new project wizard will be opened.
Now under android option click on the "android sample project" and press next.
Select the build target e.g. android 4.1 and press next.
Now you will get list of sample projects available. Select the one you want say "CubeLiveWallpaper" and press finish. You are done
That project exists in the sample projects.(CubeLiveWallpaper)
Try Creating a sample project. No need to import it.
You shouldn't import but Create New project from exists derictory and choose this project. Good luck!
As far as I know, the SDK examples aren't Eclipse projects so you can't use the Import function. Whenever I've wanted to try any of the samples, I've created the project manually in Eclipse, and then just copied the contents (res, src and AndroidManifest.xml) from the SDK folder into the new Eclipse project.

Categories

Resources