I have downloaded an sample about navigation drawer subject from this link https://www.dropbox.com/s/h7q0dzfhebbt4i7/ABSNavDrawer.zip
and there are a related video on youtube. the link is : http://www.youtube.com/watch?v=z3QE74xRxp8
I have imported in eclipse the sample and I got this error. I searched on internet about this error but i didnt find any information.
Thanks for your help...
Try to check whether u gave this line in your style.xml
<style name="app_name" parent="android:Theme.Sherlock....">
</style>
and also check whether you have imported actionsherlock
The error is cause by missing ActionBarSherlock Library.
Download and import ActionBarSherlock from this link http://actionbarsherlock.com/download.html
to eclipse.
Right Click on ABSNavDriverProject->Properties->Android , under Library section choose Add
and select the ActionBarSherlock lib.
Make sure you have downloded & imported ActionBarSherlock from the following URL:http://actionbarsherlock.com/download.html and set it as a library in its project properties. In your absnavdrawar application add the ActionBarSherlock library, clean the application and everything should be fine
Related
I have been on this problem for a couple hours. After downloading a repository from github, the only error in any .xml file is:
No resource found that matches the given name '#style/Theme.AppCompat.Light'
The code is very straightforward, but there is not one straightforward answer I have found, on how to alleviate the error.
here is the code (in file res/values/styles.xml):
<style name="AppBaseTheme" parent="#style/Theme.AppCompat.Light">
<!-- API 14 theme customizations can go here. -->
</style>
The project is located at: https://github.com/erikswed/InstaChatX
I am on Windows, using Eclipse Kepler
What are the steps for that? where is AppCompat located?
Download the support library here:
http://developer.android.com/tools/support-library/setup.html
If you are using Eclipse:
Go to the tabs at the top and select ( Windows -> Android SDK Manager ). Under the 'extras' section, check 'Android Support Library' and check it for installation.
After that, 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.
Right click on your Android project.
Select properties.
Click 'add...' at the bottom to add a library.
Select the support library
Clean and rebuild your project.
If you are looking for the solution in Android Studio :
Right click on your app
Open Module Settings
Select Dependencies tab
Click on green + symbol which is on the right side
Select Library Dependency
Choose appcompat-v7 from list
The steps described above do work, however I've encountered this problem on IntelliJ IDEA and have found that I'm having these problems with existing projects and the only solution is to remove the 'appcompat' module (not the library) and re-import it.
Below are the steps you can try it out to resolve the issue: -
Provide reference of AppCompat Library into your project.
If option 1 doesn't solve the issue then you can try to change the style.xml file to below code.
parent="android:Theme.Holo.Light"
instead.
parent="android:Theme.AppCompat.Light"
But option 2 will require minimum sdk version 14.
Hope this will help !
Summved
I am using Sherlock Library and for that I have download the library and used it as mentioned at this link http://actionbarsherlock.com/usage.html.
I have added the library code into Eclipse. Then I have created new Android Project named SharelockFragmentDemo and try to add the SherlockLibrary as follows,
It shows that library is added successfully,
But after clicking the OK button when I open this dialog again then it shows me import error as follows,
Am I missing something while importing the library ? Please help me to solve this error.
Try placing the library folder in the same location as your project. It may work.
Try to put your library and project into same drive and then import library from that drive and add it into your project
Hope it will help you.
Thanks.
I have a project target to API Level 10 and i want to implement the new ActionBar support library.
After follow all the instrutions in the Support Library Setup, when adding the library to my project I came across with dozens of error messages like this:
android-support-v7-appcompat\res\values-v14\styles_base.xml:24: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.....
OK, i know that they are many answers to this question, but, after trying all the more obvious, i still could not solve the error.
I kept searching and found the cause, which is not so obvious, at least for newbies like me.
My intent is provide a full answer to help all those who are like me and do not master all the secrets of the Android development.
This is what you have to do for use the ActionBar support library correctly.
Follow the instructions in the Support Library Setup - Adding libraries with resources.
One thing that can bring some doubt is add the library to your aplicattion project:
(1) In the Project Explorer, right-click your project and select Properties.
(2) At the left pane select Android.
(3) At th bottom of the right pane click Add
(4) Select the library project android-support-v7-appcompat and click OK.
Click OK to close the properties window.
If you not get any of the errors I mentioned it´s all done.
However if you are like me, you dont´t followed the advice of Android team that suggests you always compile your source using the latest SDK, you get the error.
The error ocurrs because my Project Build Target was Android 2.3.3 and need to be at lest 3.0.
It was not immediately clear to me because of the fact that I'm specifically developing for Android 2.3.3 and I'm using support libraries.
OK, I hope this helps.
You should add that support library to your project. To add:
Right click on project, then go to :
properties > Java Build Path > Libraries
here Add External JARs...
add android-support-v7-appcompat.jar (path/to/sdk/extras\android\support\v7\appcompat\libs)
Additionally you also have to copy that jar to libs folder of your project, if it is not there automatically.
and you should use the #style/Theme.AppCompat theme for your application for support-v7 to be working
also keep one thing in mind you should change min sdk version to 11 if you want to support("android:windowActionBar")property in your project.
I'm an android newbie trying to use the ViewPager control which is part of the "Compatibility Package."
I first used the SDK manager to install the Extras Support Package.
I then went to https://github.com/commonsguy/cw-omnibus/tree/master/ViewPager/Fragments and got the ViewPager project and loaded it into Eclipse.
I then added a libs folder to the project and put "android-support-v4.jar" into that directory.
I did a Clean build and got all sorts of errors. The screenshot of my project is at http://dl.dropbox.com/u/39662979/viewpager.jpg.
What have I faild to do?
thanks,
Gary Blakely
I have seen that you are using part of SherlockActionBar but the missing themes had to be referred to a miss library. In particular you have to import as a library project the Jake Wharthon's work and then link to your project as android library.
Delete the Theme or add the theme to your styles.xml.
I do think you don't need the Theme if you only try to use ViewPager.
So delete it.
You might be looking for ActionBarSherlock - FAQs.
There is a video that will help You get started with the library
P.S. don't forget to delete import android.R; if You have it
I want use ActionBar for my application but i found it can't use for android < 3.0.
I found this https://github.com/johannilsson/android-actionbar to solved my problem but I get error at
import com.markupartist.android.widget.ActionBar;
import com.markupartist.android.widget.ActionBar.Action;
import com.markupartist.android.widget.ActionBar.IntentAction;
Give ActionBarSherlock a try. I use it for one of my projects and after some reading of the docs and the samples it just worked. The samples are easy and straight forward, you should be able to extract what you need from them.
To see what it's able of just download the sample app from the market: Sample App (requires at least Android 1.6)
You should add the code to a library, and add the library to your project.
To do this in Eclipse create a new project, using the same package name as the github project (so com.markupartist.android.widget). In the properties select the project to be a library under the Java Build Path tab. Then, in your project, go to its properties, and select the library.
I think your including files are missing (JAR libs) , Click on error icon and then select fix project setup.
I spent around 10 hours trying to fix this problem. All the above ans does not work. Actually what is missing is android support library. To fix this, right click on project, >Android Tool> Add Support Library. Hope this save alot of time for other who came across this. just add support library both on your ActionBar library and the current project.