Android and Eclipse errors - java

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.

Related

Smartwatch 2 - Cannot compile sample project even

I wanted to start developing for the Sony Smartwatch 2 I just got.
This is where the problems started. I found many official articles about downloading and setting up the Sony Add-on SDK.
But here's the dark side:
It is not available anymore from Sony's dev site, so I could not add it by using the Android SDK manager .
After lots of sweat I managed to find it only here.
Which is the 2.0 version.
I unzipped it into my /[SDK]/add-ons/sony_add-on_sdk_2_0 folder, and set up Eclipse (4.6.3) with the following SDK manager settings:
SDK settings
First it reported the Sony SDK broken, but I found in another topic that I should add a source.properties file, in order to make it work, which has the following header:
### Android Tool: Source of this archive.
#Wed Feb 28 14:14:39 CET 2018
Addon.NameDisplay=SONY ADD-On SDK
Addon.NameId=sony_add_on
Addon.VendorDisplay=SONY
Addon.VendorId=sony
AndroidVersion.ApiLevel=16
Pkg.Desc=Android + Google APIs
Then it became visible for the Eclipse
When I try to build the SamplePreferenceActivity it is imported with SmartExtensionsAPI and SmartExtensionsUtils but one after the other as I read this can make errors too, in the following order:
API
Utils
Sample
which has the following properties:
Properties for SmartExtensionAPI
Properties for SmartExtensionUtils
With these settings I still get error in:
/SmartExtensionUtils/src/com/sonyericsson/extras/liveware/extension/util/widget/NotificationWidgetExtension.java
saying
SmartWatchNotificationWidgetImage cannot be resolved to a type
and in
/SamplePreferenceActivity/res/layout/item_gallery.xml
saying:
Couldn't resolve resource #style/Widget.Holo.ActionMode Couldn't
resolve resource #dimen/smart_watch_2_control_width You must supply a
layout_width attribute. Couldn't resolve resource
#dimen/smart_watch_2_text_size_large
"#dimen/smart_watch_2_text_size_large" in attribute "textSize" is not
a valid format. Couldn't resolve resource
#dimen/smart_watch_2_text_size_medium
"#dimen/smart_watch_2_text_size_medium" in attribute "textSize" is not
a valid format.
What am I missing here? Should I use a completely different setup? Is this because I had to manually add the SDK to Eclipse? If you need anything else to understand the problem properly, feel free to ask me, thanks for helping me!

error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'

hi i am a beginner for android i was decompile an app and i det the code source but when i import it on eclipse its give me this error:
error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
i try some tips that i found it in stack-overflow but not working
if you know the solution help me
This may caused you haven't installed API > 21 in your computer (http://android-developers.blogspot.com/2014/10/appcompat-v21-material-design-for-pre.html).
Open SDK Manager and install it.
And another important thing i want to talk about is why you use Eclipse instead of Android Studio? eclipse is now no longer supported by Google

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.

Eclipse Error: 'AndroidDataBase' is missing required Java project: 'GoogleMaps'

I am developing an app named "AndroidDataBase".
while am trying to compile in eclipse I am getting this error
Error executing aapt: Return code -1073741819 AndroidDataBase line 1 Android ADT Problem
and
Project 'AndroidDataBase' is missing required Java project: 'GoogleMaps' .
Where GoogleMaps is another androidApp.
I have the GoogleMap.java in AndroidDataBase "Src" folder.
I have tried clean build ,restarting eclipse sort of things ,still no result
Why am i getting this error ,and how to resolve it?
Thanks in advance
I have added the GoogleMap.java
the issue is activity_googlemap its not getting identified
although it is present in res/layout
You need to add the "google-play-services_lib" project as a library project. You will find it in your_sdk_root_path/extras/google/google_play_services/libproject/google-play-services_lib
Set your Project Build Target to Google API Build. From right click on project and go to Preference>Android tab>Select Target build of Google API.
I Dint installed the "Google Play Service" present in the SDK Manager .
Once I did that ,all I need is to follow the solution of # Joan P.S(Stated above I have accepted the ans,thanks to him.).
After that I have to add the Google MAP project(import it to the current work space(another app )) in Properties->Java Build Path->Projects .
That's how it got solved

Categories

Resources