I imported a project. I see import errors in each file. In the problems view I have the following errors:
Project X is missing the required source folder 'Gen'
The project can't be built until the build path errors are resolved
Unable to resolve target 'android-10'
In my package Explorer view, I don't see the gen folder so that I could tweak it.
What should I do, i am new to android.
check whether you have android-10 version installed.
Clean the application
Right click on project -> select Android tools -> Fix project properties
Re build the application.
Try to delete the folder (if it exists) and do a Project Clean in Eclipse. Mostly this helps to recreate your gen folder.
You can try to recreate it manually and make it a source folder, too!
Make sure your project build target and API level you're using match.
Related
When I create a new android project in Eclipse, and I choose to have a default main activity, my R.java file does not get generated.
I have seen some questions online and on this site about R.java not being generated but all are due to some manual action/mistake that had to be corrected during the development of the application.
However, does anyone know why R.java would not get generated for a brand new android project, where I have made no manual modifications whatsoever?
I think your problem is just the latest update of the SDK.
Test the following operations on two projects :
In the project properties (eclipse) -> java build path -> order and export make sure that all your jars in the libs folder are checked.
And "Android Tools -> Fix Project Properties"
And "Project -> Clean"
I hope you have helped!
ADT version 22 requires that you install "build tools". To get it to work i had to update:
SDK Tools
Platform Tools
Then install:
Build Tools
This link recommends you add build tools to your environment path. I had to do the following before the R.java was generated:
Append build tools to PATH environment variable
Restart Eclipse.
Make sure your project is free of errors and problems. You can use Windows-View to find and rectify them. Common mistakes are in the layout files.
Check the AndroidManifest file and see if the activity names match the classes in your source folder. Clean and rebuild.
R.java creates every time when you create android project first time r.java created by default
so check for the errors and clean the project.
I have import google-play-services_lib into my workspace and Add google project into MYProject it give mr error:
Description Resource Path Location Type
The container 'Android Dependencies' references non existing library 'D:\Android
Workspace\google-play-services_lib\bin\google-play-services_lib.jar' HBuddy Build
path Build Path Problem
Description Resource Path Location Type The project cannot be built
until build path errors are resolved HBuddy Unknown Java Problem
and I have already installed Google Play Service in Extras
I met this issue as well.
My solution is,
clean project google-play-services_lib firstly
then clean my project which depends on play service library
Hey i know what your problem is. I think it seems like you didn't built your google-play-services project... Try the following solution:
Import the google-play-services_lib "project" into your workspace
Add the freshly imported project to your applications build path
RIGHT-CLICK the google-play-services_lib project and select "Build Project"
Wait a few moments or "clean up" your project
Run your application and - Voila -
Please uncheck "Is Library" as follows ;
Your bin folder doesn't exist! You probably don't have permission to create a folder.
If you create a project from existing code make sure you check "Copy projects into workspace".
I found that the reference is looking at the wrong folder. It normally looks in <android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/bin/ for the jar file and the file is actually inside the <android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/libs folder. I couldn't find a way to change the reference link, so I just copied the jar file and the matching jar properties file from the /libs folder to the /bin folder.
I hope it helps.
My solution is,
clean project google-play-services_lib firstly
then clean my project which depends on play service library
There is another way to resolve this issue. Import google_play_services_lib project to your work space.
android-sdk/extras/google/google_play_services/libproject/google-play-services_lib
Then add the google-play-services.jar file externally.
right click on your_project -> properties ->java build path -> Libraries -> add External JARs -> select google-play-services.jar from work space ->clean ->build
It works for me.
I was facing the same issue and got it solved when I updated my eclipse Android SDK tools.
I was using version 22 and when I updated Android SDK tools to 22.0.1 the error vanished and I could build my project.
I hope this helps someone...
Check Read Only property of the Project folder.
If its checked, uncheck it and then try.
I'm setting up an Android-based Amazon AWS SimpleDB client in Eclipse (just started). I'm getting an error on the line:
import com.amazonaws.services.simpledb.AmazonSimpleDBClient;
that says "The import com.amazonaws cannot be resolved."
I've already installed the AWS SimpleDB jar file in the lib directory of my project, and added the lib directory to the build path of my project.
How do I get Eclipse to resolve the name in the import statement? Thanks.
I found the answer to my problem. I think I made an error when adding the lib directory to my build path.
Here's the right way to do it:
Right click Project -> select Properties -> Java Build Path -> Libraries and click Add JARs. Then select the JARs added to the lib directory. Thanks.
I had same error today.
import com.amazonaws would not resolve in Eclipse.
I resolved the issue by re-creating my project in Eclipse
File -> New -> Other -> AWS Java Project
I had already installed the AWS software developer kit in Eclipse.
You can try to remove that jar from the build path and rename the "lib" directory to "libs". The jar files from the "libs" directory will be added automatically to the build path.
For me the jars from the "lib" directory were not included in the apk. In the eclipse there was no problem. Only after I installed the project on a device.
I fixed it by Installing AWS toolkit for eclipse using below steps :
Install the Toolkit in Eclipse
1. Open 'Help' from Eclipse menu bar → Install New Software….
2. Enter https://aws.amazon.com/eclipse in the text box labeled “Work with” at the top of the dialog.
3. Select the required "AWS Core Management Tools" and other optional items from the list below.
4. Click “Next.” Eclipse guides you through the remaining installation steps.
After installation , Clean and rebuild the project and then restart Eclipse.
Clean Project was the solution for me.
I just reformatted my computer. I have windows xp sp3 32 bit.
I install java jdk
android sdk
eclipse ide
When I go to make a new android project i get this error.
Project 'HelloAndroid2' is missing required source folder: 'gen'
Please help i'm new to eclipse so give detail responses.
I just got this problem when I was trying to import a project that was originally created with a version of the SDK that is no longer installed on my machine.
Right click the project. Select Properties. Go to Android. Select a Project Build Target. Click Ok. You might have to clean and rebuild the project as well.
Right-click on the "gen" folder in Eclipse and select Properties. Then, remove the "Derived" checkbox. Then clean the project.
Most likely, there is a problem with one of your resources, preventing R.java from being generated in the gen/ folder. You should have error messages in your Console related to this problem.
Delete the "gen" folder. Then clean the project. Then build the project again. In my case it worked.
try this...
Right click on the project in eclips
Android tools -> Fix project properties
its works for me
ok , here's what worked for me:
delete the project and make sure you are not deleting it from the disk!
import it again and it will solve the problem.
Good luck....
My case was: I imported Zhou Weikan's cocos2d-android and the error emerged. The most straight-forward solution that came to my mind was to create the folder (right-click on the project in Package Explorer -> New -> Folder and then create new folder named 'gen'. It worked in my case.
delete the gen and its content and clean the project again.
Go to project
Right Click
New Folder (Res)
In my case it works Fine
I tried all these things and none of them worked. One day all my projects are running, next day all my projects have an empty gen folder?
After a series of tests to resolve the phantom missing R.java, the one that led me to a drastic action is when I looked at the Properties > Android and the Project Build Target was greyed out and the project wasn't linked to any SDK, almost as if there were no SDKs installed. This was after I uninstalled 4.2 and reinstalled all tools and SDKs...
Long story short, after trying everything I could find online, I just deleted the whole "adt-bundle-mac-x86_64" folder in my workspace folder, unzipped the original download, and dragged the original folder back into the workspace.
This works as a last resort, however you will have to import all of your projects back into the package explorer by New > Project... > Android Project from Existing Code, and make sure you have the "Copy projects into workspace" UNCHECKED.
IMPORTANT: You will find that you can't do this if your "MainActivity" file is always named "MainActivity," so just for future project creating, it's good practice to always name your main activity something different each time.
This error occurred when I tried to graphically add a grid layout. Deleting the grid layout folder fixed the problem for me.
My solution was to install android sdk build tools with Android SDK Manager.
The probkem was that whenever I clean the project, the gen directory becomes empty.
Hope it will help!
if gen folder or R.java file is not generated then first check error in XML file and make sure android menifest.xml is present.
Right click on the project> Properties> Android > use the latest API
takes care of everything!
In my case, the solution was downgrading the target from android-22 to android-19 at project.properties
My apologies if this is a stupid newbie question...
I'm using Eclipse (Helios release) and have the Android SDK all configured as per the developer.android.com recommendations. I can create and run new projects without any problem but I can't import archived project code samples (found on the web etc.) using Import > Existing Projects Into Workspace.
Importing a zip creates a project but it doesn't create it as an Android project and the console displays the error: "Project has no default.properties file! Edit the project properties to set one."
I've tried going into the project Properties but as soon as I click on 'Android' in the properties tree a pop-up appears saying "Could Not Accept Changes: The currently displayed page contains invalid values"
See: http://screencast.com/t/ZmY3ZWQ4
But if I do this on one of my own projects I have no such error, and I'm able to change things such as the Android Platform/API level. I'm also able to archive my own projects (using export) and import them again without any problems... nut not other people's archives! Am I being really stupid?
Any help would be really appreciated!
All the baseline default.properties needs is a line like:
target=android-8
You can most likely copy another projects' default.properties into this project. A (not-so-)quick restart of Eclipse, a rebuilding of the workspace, and you're off to the races.
It's really lame that this is needed -- it should happen as part of the import process, I would think.
just change your
project.properties file to default.properties
and restart your eclipse
it's done..
Right click on the project in navigator window, go to android tools and click on fix project properties. It might work, as it did for me ;-)
You can look at this section, it works for me:
Project has no default.properties file!
If you want to change the library of your project, do that :
- right click on the project name
- Build Path
- Configure build path
- click Android on the left, and select the library you need.
I had the same problem.
What you are trying is little difficult.Just unzip the files ,copy res and src folders
to ur existing project.The problem is the files starting with "." which have settings for their android and eclipse.
So you need to modify all that,so simply create new project or to ur existing one copy res, src and AndroidManifest.xml file.
It worked for me .
In the project right click Android Tools -> Fix Project Properties