Can't Find Theme.AppCompat.Light for New Android ActionBar Support

后端 未结 30 1877
误落风尘
误落风尘 2020-11-22 09:22

I am trying to implement the new ActionBar support library that was released by Google a couple days ago. In the past, I have successfully implemented ActionBarSherlock wit

相关标签:
30条回答
  • My issue resolve via following Steps

    1. File->Import (android-sdk\extras\android\support\v7\appcompat)

    2. Right Click Project-> properties->Android. In the section library "Add" and choose library appcompat that's include in step 1

    3. Delete all files from project's libs directory

    4. add following file to project's libs directory <SDK-PATH>\extras\android\support\v13android-support-v13.jar

      Restart Eclipse if required. That's it. Your problem should be disappeared.

    0 讨论(0)
  • 2020-11-22 10:13

    It happened to me when Eclipse(Luna)/AndroidSDK(not Android Stduio) were used with the latest tools and library as of Jan. 14, 2015 during the project like HelloWorld. When I installed those tools and made HelloWorld the first app, I accepted all the defaults. - This is the problem in my case.

    First, check whether or not the "Android Support Library" library is installed. If not, install it. It is not installed by default. You may do it all in "Android SDK manager" available in the menu.

    (Android SDK Manager -> Extra -> Android Support Library)

    Blessings, (a debtor)<><

    0 讨论(0)
  • 2020-11-22 10:14

    The accepted solution used to work for me once, but not now. I had to re-create a hello-world of the same kind (!) in a new workspace, made it compile, and then copied all directories, including .hg and .hgignore. hg diff shows:

    -        android:targetSdkVersion="19" />
    +        android:targetSdkVersion="21" />
    
    Binary file libs/android-support-v4.jar has changed
    

    It looks like Eclipse wants to compile for API 21 and fails to do anything with API 19. Darkly.

    0 讨论(0)
  • 2020-11-22 10:15

    Its bit late but here is how I get it done in AndroidStudio !

    Right click on app to goto properties Right click on app to goto properties

    Go to Dependencies and click on '+' sign and choose library dependency Go to Dependencies and click on '+' sign and choose library dependency Choose appcompat-v7 Choose appcompat-v7

    0 讨论(0)
  • 2020-11-22 10:15

    IntelliJ IDEA solution.

    1. Run Android SDK Manager and install the latest SDK and Android Support Libarary. The version of SDK and Android Support Libarary should be the same! 23 in my case. Another variants will give you the errors.

    2. Change SDK version of your IDEA project to the last one you installed in previous step. (ps. you may not use Maven).

    3. Add new Module from existing sourse to your IDEA project.

    4. Add AppCompat project. !!! Should be under the last SDK too! (ps. Say "Yes" anywhere in process of this step)

    5. Open settings of your main Project Module and add to it next 3 dependecies:

    5.1. Module Dependency. Chose android-support-v7-appcompat

    5.2. 2 pc. Library Dependencies. Add android-sdk\extras\android\support\v7\appcompat\libs\android-support-v4.jar and android-support-v4\android-support-v7-appcompat.jar

    In total it will be:

    6. Very important!!!
    Add theme with prefix @style (not another!).



    Android Studio solution.

    1. Run Android SDK Manager and install the latest SDK and Android Support Libarary. The version of SDK and Android Support Libarary should be the same! 23 in my case. Another variants will give you the errors.

    2. Add next to build.gradle

    dependencies {
        compile 'com.android.support:appcompat-v7:23.0.1'
    } 
    

    P.S. If you are new in Android developing, I strongly recomend you move to Android Studio & Gradle right now - you will get the simplest way of managing your android app.

    0 讨论(0)
  • 2020-11-22 10:15

    works:

    <style name="MyApp" parent="Theme.AppCompat.Light">
    </style>
    <style name="MyApp" parent="@style/Theme.AppCompat.Light">
    </style>
    <style name="Theme.AppCompat.Light.MyApp">
    </style>
    
    0 讨论(0)
提交回复
热议问题