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.
Related
I use Eclipse to implement android application and the workspace is empty. I can't find any of my projects and if I try to load one, it shows error as invalid description. All my projects are in the proper workspace location but still why cant I see them?
Open the workspace folder and delete the ".metadata" folder(which might be hidden).
Open eclipse and import the project again.
When I'm using eclipse and i put a project into a workspace and then try to import this project in eclipse I get an error because the project is already in this workspace, even when it's not seen in eclipse.
So, clean your workspace and try to import the project from a different folder.
Hope this helps.
It could be a severe bug in Eclipse. See the ticket:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=462571
The workbench.xmi under the following path could have problem, so that the prolog parser could not parse the projects tree:
your_work_space\.metadata\.plugins\org.eclipse.e4.workbench
I am trying to use GoogleMap V2 .But i am getting error on import these :
import android.support.v7.app.MediaRouteActionProvider;
import android.support.v7.media.MediaRouteSelector;
import android.support.v7.media.MediaRouter;
import android.support.v7.media.MediaRouter.RouteInfo;
And the error is
The import android.support.v7.app.MediaRouteActionProvider cannot be resolved
Here is the screen shot of the library that i have added
What i have to do .I have tried to import android\support\v7 By Build path .But it is not resolving my issue in there any way so that i can resolve these errors.
It looks like you have added gridlayout.jar to the projects lib folder.
Its a library project with resources. You need to reference the library project in your android projet
This library is located in the <sdk>/extras/android/support/v7/gridlayout/ directory after you download the Android Support Libraries.
Follow Adding libraries with resources
http://developer.android.com/tools/support-library/setup.html#libs-with-res
had the same problem and found that the link in my project to the appcomcat_v7 project is broken (right-click project and choose properties, then head to the Android tab)...
i removed and then added the correct project and i was good to go...
These type of Errors generally occurs when we accidentally close these libraries(by close unrelated projects,etc) which are automatically generated In Project Explorer of Eclipse like:
appcompat_v7
appcompat_v7_2
appcompat_v7_3
appcompat_v7_4
appcompat_v7_5
appcompat_v7_6
appcompat_v7_7
appcompat_v7_8
appcompat_v7_9
appcompat_v7_10
appcompat_v7_11
appcompat_v7_12
appcompat_v7_13
appcompat_v7_14
As soon as I open these files,all the errors in my app were vanished !
If It till then didn't work then do Project -> Properties -> Android -> Is Library -> Add.. -> And add appcompat_v7_*
I had a very similar problem to this after I had used force to close Eclipse.
When I then restarted Eclipse, I noticed a number of "appcompat_v7..." folders in my workspace directory. I deleted these - and maybe that was the cause of this problem.
But I resolved it by creating a new Test project in Eclipse, then restarting Eclipse to find all my projects compiled again! :)
I didn't need to change any project properties.
this solution worked for me:
The support library android-support-v4.jar cause this conflictand you see the error: The import android.support.v7.app.MediaRouteActionProvider cannot be resolved, just delete the library under /libs folder of your project, because the library is already contained in the library appcompat_v7, clean and build your project, and your project will work like a charm!
Am trying to add google-play-service library in my project using import(For Google map). After adding the path am getting red X next to this reference and the reference is not adding . Know how to resolve this ?
The red X means its a broken link path.
http://developer.android.com/google/play-services/setup.html
Copy the google-play services_lib library project to your workspace (folder where your android map project is). The library project can be found under the following path.
<android-sdk-folder>/extras/google/google_play_services/libproject/google-play-services_lib library project .
Import the library project to your eclipse
Click File > Import, select Android > Existing Android Code into Workspace, and browse the workspace import the library project. You can check if it is library project. Right click on the library project. Goto properties. Click Android on the left panel. You will see Is Library checked.
Right click on your android project. Goto properties. Choose Android on the left panel. Click on Add and browse the library project. Select the same. Click ok and apply
Eclipse does weird things when importing an existing project (google-play-services-lib), especially if you try to import and then allow the project to be automatically 'copied' to your workspace. I had the same issue and here is how I fixed it:
Close Eclipse
Erase all google-play-services projects from your workspace
Manually copy the google-play-services-lib folder (....sdk\extras\google\google_play_services\libproject\google-play-services_lib) into your workspace
Open Eclipse
Add a new project, choosing 'Existing Android Project', then navigate to your workspace and add the newly copied google-play-services-lib project
Finally, add the google-play-services-lib to your project as a library (just like you normally would)
Hope this helps! :)
Though it's over a year for this question but never the less thought of putting it down here. Might help some one facing a similar issue.
While doing a File -> Import one probably might have selected the folder,
C:\adt-bundle-windows-x86-20130729\sdk\extras\google\google_play_services\
instead of
C:\adt-bundle-windows-x86-20130729\sdk\extras\google\google_play_services\libproject\google-play-services_lib
Quite strange as Eclipse did not correctly copy the google-play-services_lib project in my workspace, but this caused a cross mark to appear in my Project Properties.
got a perfect solution for your question. this problem is due to improper referencing of library projects. You need follow these step.
create a new project
copy all the java files from src of your previous project in which you are getting error to the new project you have created just now.
Also copy layouts xml files.
now import play services you will not get this error.
I was also getting same problem.
I copied google library folder into work space and import now it's working fine.
Try to place the Google-play-service library with in your same working Directory by coping the files from Click File > Import, select Android > Existing Android Code into Work space, and browse the work space import the library project.
This is common issue Youur google-play-service-lib project and your android project should be inside the same folder For example
if your Android Appplication name is MyMap is in D:/workspace t hen your play service lib project should be in the same directory D:/workspace
Close Eclipse. Delete
.metadata
and
.recommaditions
folders from your workplace. Import your projects back.
You add Project in to your workspace.
Start Eclipse and import project one option is ther copy to workspace do it.
After that add google play services it also copy in to your work space
and add it your library hope so its working.
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.
I have a root directory with a number of android eclipse projects inside. They all have .project files, but eclipse does not seem to see them as eclipse projects? Does anyone know the reason why?
Cause for not importing projects in eclipse :
Reason 1 : Project Structure Differs
Reason 2 : Project Configuration files missing or not available
Reason 3 : Project can be already exists in workspace
Reason 4 : Don't have Proper and Standard Naming Convention
Follow these steps.
Hope you have android sdk and ADT plugin for eclipse.
File-->Import-->Android-->Existing Android code into workspace.
Then import the projects from your root directory using Browse button. If you don't have ADT plugin definitely you never import your android projects.
You have to import them manually
First File > Import
Then General > Existing Project Into Workspace
Either select root directory or Select archive file, click Browse to locate the directory or file containing the project that you want to import
Under Projects select the project that you want to import
Finally click finish to import the project
Here is a link to the eclipse help section on this
http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-importproject.htm