0

I try to use the android development tools trough Eclipse Luna.

Exactly I try to use the JBoss for cordova developmet

I have a problem to run the Android emulator. So I tried first to create a clear Android Application project and it have the following error.

enter image description here

enter image description here What should I do to fix them and run the emulator properly?

styles.xml

<resources>
 <!--
 Base application theme, dependent on API level. This theme is replaced
 by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
 -->
 <style name="AppBaseTheme" parent="Theme.AppCompat.Light">
 <!--
 Theme customizations available in newer API levels can go in
 res/values-vXX/styles.xml, while customizations related to
 backward-compatibility can go here.
 -->
 </style>
 <!-- Application theme. -->
 <style name="AppTheme" parent="AppBaseTheme">
 <!-- All customizations that are NOT specific to a particular API-level can go here. -->
 </style>
</resources>
Sevle
3,1192 gold badges22 silver badges32 bronze badges
asked Feb 11, 2015 at 7:25
8
  • You have an issue in styles.xml that is causing ANT to fail to build your R file, causing errors in MainActivity. Please post the contents of styles.xml. Check the console (not error log) for more info. Commented Feb 11, 2015 at 7:28
  • I think the project is missing the android support library. Right Click on Project -> Android Tools -> Add Support Library Commented Feb 11, 2015 at 7:30
  • @MattClark here is the file filedropper.com/styles_2 Commented Feb 11, 2015 at 7:32
  • @ThahzanMohomed I tried it but it gives me [2015年02月11日 09:32:57 - SDK Manager] URL not found: C:\Program Files (x86)\Android\android-sdk\temp\support_r21.0.3.zip (Access denied) [2015年02月11日 09:32:57 - SDK Manager] Done. Nothing was installed. Commented Feb 11, 2015 at 7:34
  • 1
    Having this file throw errors with just the default data means that you should try Chris' method below, it seems as if you are missing appcompat_v7. Commented Feb 11, 2015 at 7:55

1 Answer 1

2

ActionBar is found in support library v7. Maybe it's missing. You can right click in your project -> Properties -> Android There you should see a library added with a green mark like the following: enter image description here

If you don't have any library there, you should import the library by going to: File -> Import -> Android -> Existing Android Code Into Workspace Then look for your library v7 into the sdk folder like the following picture:

enter image description here

Then click finish:

enter image description here

And go back to right click on your project and go to properties to add the library by clicking in the Add... button and selecting the library:

enter image description here

Hope this solves your problem!

answered Feb 11, 2015 at 7:50
Sign up to request clarification or add additional context in comments.

1 Comment

thank you very much for your answer. It seems to run as solutin but maybe the problem with the eclipse is more general to me because it gives me this [2015年02月11日 10:04:09 - android-support-v7-appcompat] WARNING: unable to write jarlist cache file C:\Program Files (x86)\Android\android-sdk\extras\android\support\v7\appcompat\bin\jarlist.cache [2015年02月11日 10:04:24 - android-support-v7-appcompat] WARNING: unable to write jarlist cache file C:\Program Files (x86)\Android\android-sdk\extras\android\support\v7\appcompat\bin\jarlist.cache

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.