no resource found in eclipse - java

I am getting this error while creating a new android application project in eclipse Juno in mac.
Description Resource Path Location Type
error: Error: No resource found that matches the given name (at 'theme' with value '#style/AppTheme'). AndroidManifest.xml /testProject line 10 Android AAPT Problem
Also it is not creating a mainactivity as it used to do before. Recently I've upgraded android SDK tools to rev 24.0.1.
Kindly help me.

To fix this issue follow these steps.
Update ADT plugin of eclips
Make sure that AppTheme is defined in the styles.xml file.
Use latest AppCompat library if you consider backward compatability.
Make sure that your compiling and target versions are set to
21. Its because the new AppCompat only compiles on 21.
Right click the project and click "Properties". Then select "Android" from the tree on the left. You can then select the target target version on the right.
Note: Make sure your properties, classpath and project files are writable otherwise it won't work

Related

Android - Eclipse project making and R file error

I'm having issue with Eclipse and I work in android. This issue happens when I create a new project and when I click finish, It auto generates the project without R file and The project creating window doesn't closes and I have to close it. I have many old projects which work fine(Until now) and the issue is only coming when I make a new project. I also get a error in Styles.xml file saying that "Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'". When I press CTRL+RightClick onto R file then it takes me to a window which says "Source Not Found". If you have any solution for this, Please post your answer under this question. Thank you!
EDIT: Appcompat error was solved later.
To solve missing R in generated java files, make sure that Android SDK Tools and Android SDK Build-tools are installed and updated in SDK Manager. Then, make sure Eclipse is updated. After this, clean your project and rebuild.
To solve No resource found "...AppCompat...", make sure Android Support Library is installed and updated in SDK Manager. Then, the AppCompat library can be found at:
android-sdk/extras/android/support/v7/appcompat
You need to reference this AppCompat library in your Android project.
Import the library into Eclipse. To do so:
Right click on your Android project. Select properties. Click 'add...' at the bottom to add a library. Select the support library. Finally, Clean and rebuild your project.

Gradle Android Build Project Error: Could not find meta-data resource

Brand new install of the Android SDK, and Android Studio. Brand new project, literally no changes to any file in the project. Working AVD, running 4.4.3 (or something similar). I get the following error:
Gradle 'Gigviz' project refresh failed.
Error:Could not find meta-data resource 'META-INF/services/javax.xml.datatype.DatatypeFactory' for service 'javax.xml.datatype.DatatypeFactory'.
The best reason I can think of for this error is that I'm missing some component of the javax.xml.datatype.DatatypeFactory dependency. Has anyone encountered this error before?
I'm on OS X Yosemite, latest version of Android Studio.
Download this : http://www.java2s.com/Code/Jar/j/Downloadjavaxxml134jar.htm
Put it inside your JDK folder, in your program files. Something like this :
C:\Program Files\Java\jdk1.8.0_31\lib\missioncontrol\plugins
And see what happens.
Found this on Gradle's forums, same error cause by a duplicate set of jars, inside the JDK's lib/endorsed folder. Usually when I get any build errors with META-INF in them, it is because a duplicate files somewhere. Also make sure you are using Java 1.7 or lower.

Android:Error an Exclamation mark in my project how to resolve it

i got a pop up when i started my android eclipse stating that there is a new version which has to be upgraded for 22.6.2 version but your sdk is in 22.3 version even i had error that sdk is not installed in your eclipse so i went to help-> install software added repository then restarted my eclipse.
after that i added my code as usual to start coding my project but i got an exclamatory mark near my project when i compile dialog box appears as you have error in your project
Exclamatory mark shown in image
Next i went to show view -> problems . to check the problems i got an error stating about Android dependencies
next i went to quick fix the project but dialog box appeared
after fixing i got an error in jar file itself as shown below
in this we can check the errors
i am not able to resolve the error in the jar file can anyone help to resolve it
thanks for your time and help in advance
You need to reference AppCompat.
Download the support library under extras from Android sdk Manager.
AppCompat is located # android sdk/extras/android/support/v7/appcompat/
Import the library project into workspace.
Select File > Import.
Select Existing Android Code Into Workspace and click Next. Browse ( android sdk/extras/android/support/v7/appcompat/) and click finish
Right click on your project. Goto properties. Android. Add. Browse and Reference AppCOmpat.
Done.
Snaps
Library project imported to eclipse
Referenced AppCompat
You can try thus. Such as
You have updated the android sdk but not updated the adt to match with it.
You can update the adt from here
You might need to update the software source for your adt update
Go to eclipse > help > Check for updates.
It should list the latest update of adt. If it is not working try this
go to eclipse > help > Install new software
Click on add
add this url : update adt dynamically
give it any name.
It will list the updates available- which should ideally be adt 20.xx
Eclipse will restart and hopefully everything should work fine for you.

The project was not built

I am unable to resolve the error below.
"The project was not built since its build path is incomplete. Cannot find the class file for android.content.Context. Fix the build path then try building this project"
I imported the existing project into eclipse and the above error message was shown. I checked the other solution in this site but no solution worked.
Go to Windows --> preferences --> Android then check out for version of your workspace and Android SDK you are using. Add external jar files for the correct version of android platform
For instance you are using 2.2 then minimum sdk is 8, then you have to add android 8 platform jar file.
Also check your SDK path just in case where you have located it may be in case you using Windows 7 and you may have put your sdk folder in program file(x 86) for 32 bit.
Go to build path -> configure build bath.Click on android in left menu bar.choose any android vendor present over there.Click apply and ok.So that , all android related stuff get build.

I'm using Java ADT and I imported a project and I got: Unable to resolve target 'android-18' until the SDK is loaded

I'm making a Bird Song quiz game with sound and pictures. I'm using Java ADT and I imported the project, then I had to download a new ADT. Now I'm getting: Unable to resolve target 'android-18' until the SDK is loaded.
I'm also getting this, which seems to be a smaller problem (I've been able to fix it before): The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project
What should I do?
Right click on the project that you have imported.
Go to Properties -> Android -> Project Build Target
Just like mine , none of the checkboxes will be checked in your's too.
Click/ Tick on any check box.
Then Press Apply-> OK
Your issue of "Unable to resolve target" will get solved.
Hope this hepls. Comment for further help.

Categories