I tried to implement ActionBarSherlock project into my ohter Android 2.2 project. Only thing i need is to use IcsSpinner and its value of "android:spinnerMode". While importing whole ActionBarSherlock project, I get lot of errors like:
[2013-09-30 09:04:56 - AppGlobal] C:\Users\User\Downloads\ActionBarSherlock-4.0.0\ActionBarSherlock-4.0.0\library\res\values\abs__themes.xml:166: error: Error: No resource found that matches the given name: attr 'android:windowActionModeOverlay'.
anyone faced same problem? I have support library in my app project included, in library project there is used Android 4.0. I get the same problem even when I change Android in AB Sherlock library to 2.2...
Thx
Your Android project and the ABS project both needs to be compiled with an SDK >= 4.0
Go to
Properties > Android > Project build target
and choose an SDK with an API level of at least 14.
See this answer.
Related
I'm working on an Eclipse Android project (target SDK 18). Since I wanted to use some Material Design features from Android 5 I added the library project Design Support Library (Target SDK 23) to Eclipse and linked it to my project. This project links to another library project called Android-support-v7-appcompat.
I get the following error: "The import [...].myProject.R cannot be resolved".
Whenever I remove the support library from my project the error disappears.
Since a lot of people had the same problem before I already tried rebuilding and cleaning the project a couple of times. I read this post and added the android-support-v7-appcompat.jar to my project. I delted the support v4 jar from the support-v7 libs folder. Then I followed this guide and made sure that the \res folders didn't contain any errors. Still no success. I hope someone can help me.
Hi I am a newbie to android and I am trying to run the Sliding Menu Example but i am getting so much errors
I have downloaded the package from here:
http://github.com/jfeinstein10/SlidingMenu/
and setup the actionbarsherlock
Also followed the instructions listed over here: http://boroniatechnologies.com/installing-slidingmenu-android-library-and-example/
and i am getting the following errors:
I am using Eclipse 22.0.0 and recent version of Android SDK
try this...
add actionbarsherlock library to slidingmenu library
in your project libraries, use only sliding menu library, not
actionbarsherlock.
delete the android support library in libs
folder in slidingmenu library, and in libs folder in your project
and clean all projects, and try it.
If you have updated SDK means,
select project->right click->go to properties->order and export>select Android Private Libraries. Click Ok.
Clean the project and run it.
The usual suspect for such errors is the minSdk/targetSdkVersion of your Android project. Try minSdkVersion of 7 and targetSdkVersion 17 (latest as of now). That is, your AndroidManifest.xml should be having this line
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17" />
And also, from project properties, set Android 4.2 (latest as of now) as the target. Project properties -> Android -> target:4.2
That should solve it. But, if you are still getting errors (on account of different versions of SlidingMenu), experiment with higher minSdkVersion.
I have been trying to get ActionBarSherlock ( http://www.actionbarsherlock.com ) working with my eclipse projects. I added ABS into a new project with target version 3.2, and this created fine. When I try to add this as a library to my other project (min version 2.1, target 3.2), I get errors such as
G:\EclipseWorkspace\Android\ActionBarSherlock2\res\values-v11\abs__styles.xml:65: error: Error: No resource found that matches the given name: attr 'android:windowActionModeOverlay'
basically, none of the xml attributes found in 3.0 or higher are recognised. As a consequence, R.java does not generate.
Am I doing anything wrong?
You need to compile with Android 3.2 in addition to targeting at least API 11 both in your app and for the library.
In eclipse, right click on the project and go to "Properties". Under the "Android" tab you'll need to select Android 3.2.
Eclipse is giving me strange Errors too, when implementing external libraries. What always helped for me after some tries:
try multiple times:
*rightclick on your project => Source => Clean Up
*delete and readd the library project
*restart eclipse several
you might also try to delete the generated files to force it to regenerate, but do this on your own risk :)
have fun w/ the open source libraries :)
Try upgrading the version of the sdk and target version 2.1:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="15"/>
This will allow using last sdk features and the app will work on version 2.1.
Maybe, you'll see issues even after fixing this. Then you can clean the project.
I am using ActionBarSherlock to implement action bar on my Android 2.1 API 7 project. (With Eclipse IDE)
In order to use sherlock, I imported sherlock library as a existing project on Eclipse. Then, I added it as library on my own project.
However, in my own project, the Eclipse's console shows me the following error:
JakeWharton-ActionBarSherlock-436230d/library/res/values-v11/abs__styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo'.
JakeWharton-ActionBarSherlock-436230d/library/res/values-v11/abs__styles.xml:48: error: Error: No resource found that matches the given name: attr 'android:actionBarSize'.
JakeWharton-ActionBarSherlock-436230d/library/res/values-v11/abs__styles.xml:49: error: Error: No resource found that matches the given name: attr 'android:actionBarStyle'.
...
Why??
(I have set target SDK to Android 3.2 for Sherlock.)
Set target SDK to Android 3.2(Version 14) or above. Your desired version can be anything from Android 1.5 (version 7?) upward if I remember correctly.
Afaik you have to use the api level 14 (or at least honeycomb) library when using ActionBarSherlock. You can still set the minimum version to 7, but the target version has to be ICS (or maybe honeycomb).
But then you have to make sure that you're not using any methods introduced in later versions.
Open the ABS Properties and the change the Project Build Target in the Android tab to 13.
Set in Android-manifest file to target sdk to 14
I am using ActionBarSherlock to implement action bar for Android 2.1 platform.
But in Eclipse, no matter I import existing project from download ActionBarSherlock library or create new project from the download library, I always get error of "R can not be resolved". Then I notice that there is no R.java file under gen/ folder. I tried to clean the project, but it does not help... Anyone can help me on how to get rid of this ActionBarSherlock library?
ActionBarSherlock (v3.x) requires that you compile with Android 3.2. The reason you are not seeing an R.java file is that you are likely using a previous version for compilation which means some of the styles that are used on Android 3.0+ cannot be found.
Make sure you are building with Android 3.2, target API 11+ in your manifest, and are using JDK 1.6. Those are the common pitfalls with compilation of the library.