I am having a issue regarding the resolving of appcompat_v7...As mentioned on many answers i imported the jar file from the \sdk\extras\android\support\v7\appcompat\libs...
but the problem is under properties->android i am getting a red cross next to appcompat_v7
as mentioned on various answers i then clicked on add button here...but i get no library name
the library is installed as the import is working properly as can be seen here the import shows no error..but my style.xml file in the res folder is showing the following error
can somebody please tel me what i am doing wrong here..
also my SDK manager shows that my android support library is installed...
I am just new to android and cant figure out what I am doing wrong here..
You dont import jar's from the appcompact-v7 library. You import the library itself in your workspace. Then you add the library into your project. In your project you can remove the appcompact-v7 in red and add it again. That should solve the issue.
Note also that:
You must have the latest versions of SDK Tools / Build Tools / Platform Tools. If you try this and it doesn't work, then go to the Android SDK Manager and make sure you have the latest versions of the required tools.
In case your project only requires API level 14 (Ice Cream Sandwich) & above, select API level 14 for "minimum required SDK" in the project wizard when you create a new project. Now the appcompat_v7 library will not be required for this project, and the application will use the native ActionBar class which is present in AOSP builds from ICS onwards.
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'm developing an android application and I'm trying to use a library Sliding Menu (github.com/jfeinstein10/SlidingMenu). However, I have a problem in using the library in a clean project. I get
java.lang.NoClassDefFoundError: com.slidingmenu.lib.R$styleable
when doing
SlidingMenu slidingMenu = new SlidingMenu();
Configurations tested:
JDK tested 1.6u43, 1.7(latest)
Project target api = tried both Android 4.2.2 and Google API 17
SDK versions tested 21, 21.0.1, 21.1
Windows 8 Pro x64, Intel Core i7 3610QM, Nvidia GT660M, Samsung Pro 840 256GB SSD
Integrated both with Actionbarsherlock and without it.
I import the library, by creating an Android Project from Existing Code, marking "Is Library" in the android properties, and then referrencing it in the original application android properties (not via .jar)
Below links to code snippets, full stacktrace and screenshots of current configurations
Code snippet:
http://pastebin.com/2yzRC5AJ
Full Stacktrace:
http://pastebin.com/D7RQwuQd
I've been stuck on this for 3 days now... :/
I had to add the dependency two ways before I eradicated my noclassdef errors
Add the library.jar from /bin as dependency to your build path, make sure to select the Order and Export tab and select the check box as well for the new dependency.
Add the library via right mouse click on your project, then properties, then android then add library
Voilla
I struggled with this as well, and from a vast number of google searches, managed to piece this together.
Hope it helps..
Simple solution :
If your project already contain support library then just delete support library from library(jfeinstein10 / SlidingMenu) and then every thing works fine.you can do it after import also.
1) Just add the library to the properties of your project (ANDROID);
2) And mark the same in Order & Export property of (JAVA BUILD PATH);
I had the same problem. Since you're building the app with IDE, you need to tell the IDE that this module is a Library, thus defining the library in .properties file would be useless. Try change the IDE build file, I'm not familiar with eclipse, but in android studio this lines would be enough:
module.iml
<configuration>
<option name="LIBRARY_PROJECT" value="true" />
</configuration>
Go to Manifast and change sdkversion to 11
I have imported the android api sample applicaition into Eclipse. I am getting compile error in import and where ever this R is used. Api levels are fine, I couldnt see R.class is getting generated. Please spot my prob and help me out fix this.
`import com.example.android.apis.R;`
clean the project(go to project->clean)...if not solved
manually add the library(right click project->properties-->search for 'java build path)
I finally debugged why this hasn't been building. (I had it running in older SDKs.)
After trying the various suggestions here to no avail, I found that the project is missing the accessibility_node_provider_instructions string resource from res/values/strings.xml. Plus it also needed the android-support-v4.jar library for PrintBitmap.java.
This is with Android 4.4.2 (API 19).
Check if the package name in the manifest tag of AndroidManifest.xml is correct com.example.android.apis
If you have created the api samples project via. eclipse -> New ->Android Sample Project you should not have any project with package.
The jre system libray was not added in the project, once added the issue get resolved.
Hopefully I am not missing something obvious. I have done a good bit of work to isolate this issue. Say I create a new Android project:
Target Platform: Google APIs Android 3.1 (API 12)
Min Platform: Android 2.2 Froyo (API 8)
When the project is created, AndroidManifest.xml shows min=8, target=15 (not sure why 15 and not 12 actually, but that's not the issue). And this looks fine:
included JAR: Google APIs [Android 3.1]
project.properties shows target=Google Inc.:Google APIs:12
So far, so good.
Now, without even editing the fresh project, I remove that project from the workspace, move it somewhere, and import using Import->Android->Existing Android Code into Workspace.
Now:
Included JAR: Android 2.2
project.properties shows target=android-8
And the project now has errors due to things like the Holo style not being present in 2.2.
I tried Project->Clean, nothing. I tried Android->Fix Project Properties. No change.
The only fix is to remove the project, delete the project.properties, update the AndroidManifest.xml to use min-sdk 12, and re-import. Even, then, I don't get the Google JAR:
Included JAR: Android 3.1
project.properties shows target=android-12
It seems like the import process incorrectly uses the min SDK value instead of the target when creating the project. Or is this somehow expected behavior? What am I missing?
(This scenario may seem a bit contrived, but I am an instructor trying to import student assignments. So this is causing me difficulties!)
Right click the imported project and go to
Properties - Android - Project Build Target
Specify the build target as the target sdk version.
Now it should include the correct jar file.
Hope this helps