Android project(4.4.2) is not running after eclipse & adt update - java

I updated my Sdk manager,eclipse & ADT but now old projects are not
running. Its giving like error below
C:\Users\Deepak\Desktop\New
folder\VishwasBawa\res\values-v11\styles.xml:7: error: Error
retrieving parent for item: No resource found that matches the given
name 'Theme.AppCompat.Light'.
C:\Users\Deepak\Desktop\New
folder\VishwasBawa\res\values-v14\styles.xml:8: error: Error
retrieving parent for item: No resource found that matches the given
name 'Theme.AppCompat.Light.DarkActionBar'.

It looks like you're using the appcompat v7 library in your project. If you do, to resolve the error you've got, open project.properties file in your imported appcompat v7 project and change the target value to target.target=android-21 and save the file. Then, clean all Android projects. This should fix the errors in your Android project.
Note: Changing the target value to target.target=android-21 is equivalent to selecting the Properties of the appcompat project. Then, select Android | Project Build Target | Android 5.0.1.

Related

Android and Eclipse errors

I am new to android.
I created new Android app project. Min SDK: 16, target: 21. And I got bunch of errors similar to this one:
[2016-05-31 22:36:16 - project1] E:\workspace\project1\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2016-05-31 22:36:16 - project1]
and also red underlined lines: "The import android.support.v7" cannot be resolved. The same with ActionBarUtilty and many others.
It was new project!
I reinstalled SDK and eclipse...it didn't helped.
I can't find solution..I tried to include .jar libraries from SDK but I am doing it wrong or it doesn't help..
Eclipse is dead for Android development, I think since 2013-2014. Download Android Studio https://developer.android.com/studio/index.html , You will see it very simple to start a new project.
You can download the sdk and android-studio in one installation.

Eclipse Android app project issue

I just downloaded all of the things for making an Android app, I usually use Python so first time I work with this.
I opened Eclipse -> File -> New -> Android Application Project. Gave name etc. After I choose Blank activity the name of Activity Name: MainActivity and Layout name: activity_main I press finish and this window is not closing, I just see error logs on Eclipse:
C:\Users\windows\Desktop\ANDROID\eclipse-java-mars-2-win32-x86_64\test_prg\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
C:\Users\windows\Desktop\ANDROID\eclipse-java-mars-2-win32-x86_64\Flafel\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
I searched for it on Google but I don't understand anything, Eclipse and workspace is in the same location. Both of them in the folder named ANDROID on Desktop. How can I fix this problem?
I have checked my own SDK for eclipse and I have a folder named android-sdk\extras\android\support\v7 . then I would suggest you download new SDK and android studio. Google has stopped giving support for eclipse for a long time.

installing android ADT with eclipse

i recently downloaded the android sdk but when i try to create a new android project in eclipse , it always shows the same error
[2016-04-15 01:22:40 - HelloWorld3] C:\Users\Admin\workspace\HelloWorld3\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2016-04-15 01:22:40 - HelloWorld3]
[2016-04-15 01:22:40 - HelloWorld3] C:\Users\Admin\workspace\HelloWorld3\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2016-04-15 01:22:40 - HelloWorld3]
[2016-04-15 01:22:40 - HelloWorld3] C:\Users\Admin\workspace\HelloWorld3\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
[2016-04-15 01:22:40 - HelloWorld3]
the project is not created. i was using eclipse luna before, i reinstalled eclipse and now i have mars 2. i also deleted the latest packages from SDK manager. these are the only solutions i have found
another thing that i noticed is that eclipse is not working as it should after installing android sdk. for example the icon doesnt change. in the welcome page after installing sdk, it does not give me the option to choose from existing SDKs. when i click File -> New , there is no android application project, and i have to select project then click on android and then android application project.
can someone pls help ??
You are missing the support project ....
Do this:
File -> Import (android-sdk\extras\android\support\v7). And there choose "appcompat"
Project -> properties -> Android. In the section library "Add" and choose "appCompat"
To be honest with you, you will have less headache if you start using Android Studio, since it is now the official IDE for andoid and you recieve all the latest updates pretty much automatically. But if you Really have to work with Eclipse for some reason thats how you do it:
File -> Import (android-sdk\extras\android\support\v7). And there choose "appcompat"
Project -> properties -> Android. In the section library "Add" and choose "appCompat"
The error says you that you are missing "appCompat".
I said pretty much same that #ΦXoce 웃 Пepeúpa did but really consider going to Android Studio.

Error when creating android project on eclipse

I have been struggling with eclipse for about a month now .I deleted eclipse software even booted my pc thinking it have have confilicts with my other software.Even my teacher couldnt help me to fix this. Every time i try to create an android projects i get a lot of error from the start .Appcompact shows up with error .I found here people giving advices i did all of that but nothing has worked for me .
On console :
C:\Users\mm\Desktop\workspaceandroid\appcompat_v7\res\values-v21\themes_base.xml:193: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
C:\Users\mm\Desktop\workspaceandroid\appcompat_v7\res\values-v21\themes_base.xml:190: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
C:\Users\mm\Desktop\workspaceandroid\appcompat_v7\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
when i check the error section it shows :
Description Resource Path Location Type
error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'. styles_base.xml /appcompat_v7/res/values-v21 line 75 Android AAPT Problem
Description Resource Path Location Type
The container 'Android Dependencies' references non existing library 'C:\Users\mm\Desktop\workspaceandroid\appcompat_v7\bin\appcompat_v7.jar' Testapp Build path Build Path Problem
Description Resource Path Location Type
The project cannot be built until build path errors are resolved Testapp Unknown Java Problem
Please any one can help me fix this problem , i couldnt advance on my projects because of it.I would really apreciate your help.
i do not know so i will just post this.. fyi: i have not specifically experienced this type of error, but more like it..
1 : delete the android-support-v4.jar in your project and copy the appcompat_v7's rather
2 : Delete the all the files in the bin folder of the appcompat_v7 and clean and build and restart (if this doesn't work at the 1st instance, disable build automatically-[by clicking the project on your eclipse], and redo the no2 and save and restart eclipse, and build save, and restart..)
3 : right click on your appcompat_v7 project goto build path then configure build path
then java build path and to the tab order and export and uncheck all the libs there the ones ending with .jar ... if you do not see .jar files then (uncheck android private libraries)(goes with the condition - that's a hard guess because on my project its checked)
4 : if you have other libraries then follow number 2(and 3) on them (3 is optional)
5 : if none of them are working check if there's some update on the adt or anything that can be updated
Always clean rebuild and restart eclipse okay.. Hope it helps
You should open the project.properties file from android-support-v7-appcompat and change the target api level to target=android-21.
Don't forget to clean the workspace after that using Project --> Clean...

Building a project with Ant that includes ActionbarSherlock as a library project

I'm having an issue building my project with Apache's Ant which includes ActionbarSherlock as a project library. I have successfully included the library using "android update lib-project --path . --target android-13" in actionbarsherlock library folder and in my project used "android update project --path . --target android-13 --library path/to/actionbarsherlock/library"
Using ant debug builds the library correctly but when going to my project folder and trying to build the project i get the following errors:
[aapt] /var/www/vhosts/nicom/httpdocs/cl_app/res/values/style.xml:40: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light'.
[aapt] /var/www/vhosts/nicom/httpdocs/cl_app/res/values/style.xml:41: error: Error: No resource found that matches the given name: attr 'abBackground'.
[aapt] /var/www/vhosts/nicom/httpdocs/cl_app/res/values/style.xml:42: error: Error: No resource found that matches the given name: attr 'abLogo'.
[aapt] /var/www/vhosts/nicom/httpdocs/cl_app/res/values/style.xml:43: error: Error: No resource found that matches the given name: attr 'actionBarSize'.
Has anyone successfully built a project with this library? I'm guessing this is a library specific error and has nothing to do with my project in general but some one please correct me if I'm wrong.
Actually, I had this same problem and it was very frustrating because I didn't know what it is that I was doing wrong. But it turns out that there is some issue with the android-sdk that doesn't allow custom attributes to be defined in a library project.
Google Issue page shows that this has been open for a long time!
So for now, if you really need to use the library, you need to copy all the layout files that are present there in the library. (I know, it sucks!)

Categories

Resources