I'm a beginner at Android and there's an existing Android project I'd like to import into Eclipse.
From googling I found I should do this via File/Import/Existing project, which I did (there is a .project file in the root directory of the project I wish to open).
However after doing this Eclipse displayed an error message saying:
"ERROR: Unable to open class file C:\Users\ ..... \R.java: No such file or directory"
However the file R.java does exist at the location Eclipse is displaying in the error message.
Why does it think the file isn't there when it is?
How can I proceed to open the project?
TIA
I was able to import the project but after I cleaned the project I wasn't able to import the same project back to the same workspace. I think some files got deleted from the cleaning process.
I ended up changing the workspace directory and was able to get it working again.
Try to Clean your project and then Rebuild it. You could also try to manually delete the R.java file and Rebuild your project.
Related
There is a folder project that is done in Eclipse on another computer, now I copy it to workspace folder on my computer, and when I open the Eclipse I found the project folder after I add it to Eclipse and there is an error that I do not know how it is solved.
When I saw the error it is in AndroidManifest.xml file and when I open it is empty, and the error is:
Parser exception for
C:\Users\MAX\workspace\Your_Guide\AndroidManifest.xml: Premature end
of file.
Really need help.
I dont think you can willy-nilly move a folder into the workspace. Try importing the project using File > Import > General > Existing projects into workspace, and finding your directory where the .project exists.
Use the option "Existing Android Code Into Workspace".
File -> Import -> Android -> Existing Android Code Into Workspace.
I have ADT Eclipse Project and I want to just import that project in android studio.
But I got this error There are unrecoverable errors which must be corrected first.
The error is saying that your project depends on google_Play_Service_Lib and android studio is not able to find that dependency, but what android studio did is giving you the path where you can paste that library and then you will able to import that project.
first download google_service_lib from
https://github.com/aporter/coursera-android/tree/master/Examples/google-play-services_lib
or
https://github.com/MobileChromeApps/google-play-services
and now paste that in
E:\android\CFPEvents\cfp-android-user
now again import..
find project.properties
open it,
delete(No package)android.library.reference.1=../android-support-v7-appcompat
later,you need download the package.
link http://blog.csdn.net/wu_wxc/article/details/47091795
You need to add the
google_play_service_lib
in the folder
E:\android\CFPEvents\cfp-android-user
and re-import the project.
Above answers are right but it seems it is only the First Step on the way to solving this issue because I had faced the same issue.
So what can be done?
First Step
First download google_service_libary not only jar and now paste that in E:\android\CFPEvents\cfp-android-user(path of your project folder).
Second Step
Close your project
Back up your project
Delete the .idea folder in the root directory of the project
Delete all the .iml files in your project
Import your project in Android Studio, and in the dialog that prompts
you for a file, choose the build.gradle file.
After this you should be good to go.
I updated the SDK to SDK-18 and ADT to 22 version my current project shows
FAILED TO CREATE BUILDCONFIG CLASS Im working as normal user.
If i open the same workspace as administrator it works good.
i tried
projcet->clean
android tools->fix project setup
Window->preference->Java->build path->changed folders to project
I tried to create new workspace and import the same project got same problem
Help me to solve this issue
I solved the problem by delete the file under bin/ and gen/ directory. I think it is the permission problem. Check your project directory and make sure you have admin right.
After I imported the sample project from CD. I got the same error message. It is a permission problem. I did the following steps:
close project in ADT
change the directory and subdirectory permission in workspace.
Then, the error message gone.
Do the following steps
Delete the bin folder
Restart eclipse
Clean and run the project
Chanage Permission of your project directory to 777. Because of read only permission eclipse not able to write new files in bin folder.
I want to export my project in order to reuse the code into a new project.
Every time I try to export it, both "file system" and "archive file" I get error
Problems were encountered during export:
Error exporting name_of_my_project/bin/jarlist.cache: Resource is out of sync with the file system: '/name_of_my_project/bin/jarlist.cache'.
Resource is out of sync with the file system: '/name_of_my_project/bin/jarlist.cache'.
Maybe it depends on the fact that I copied file into my project folder without using Eclipse.
Is there a way to solve the problem?
In Eclipse, right click on the project and click Refresh. This will have Eclipse resync the project with the filesystem.
Right click on that particular project
Click Refresh
That's it
Now: Do the export and it will work like a charm. Sometimes when you manually copy projects into the workspace, like I did, you encounter syncing problem. Refreshing the project re-sync it with the file system.
I am trying to import a archive file containing Android application project in Eclipse. But I receive a message No projects are found to import. Same goes when I am importing a root directory. Why I am getting this message?
The project in question may not have been set up to work with Eclipse. For example, it might not have .classpath and .project files.
If so, you can still "import" it into an Android project -- start a new Android project and choose "Create project from existing source".