error after updating the support library

前端 未结 5 783
耶瑟儿~
耶瑟儿~ 2021-01-01 16:47

I just updated my libraries when Android 5.0 got lunched today

one of the files that got updated is android-support-v7. after that I kept getting these errors

相关标签:
5条回答
  • 2021-01-01 16:50

    If using eclipse make sure you have updated these tools from SDK Manager-

    1. Android 5.0(API 21)-SDK Platform
    2. Android support repository
    3. Android support library
    4. Google Play Services
    5. Google Repository
    6. Latest Build Tools

    After updating all of them import v7 project and open the project.properties file of the android-support-v7-appcompat and change the target from target=android-19 to target=android-21 .

    Clean the project and you are good to go.

    0 讨论(0)
  • 2021-01-01 16:51

    My solution to a similar error;

    1) I installed 21 api with sdk manager.

    2) I changed my project's build target to 21. and I changed v7-appcompat library build target to 21.

    and finally I think support library projects (v7-appcompat or v7-gridlayout) must be in workingset.

    0 讨论(0)
  • 2021-01-01 16:53

    In order to switch to the API v21 versions of the compat and support libraries, you also have to switch to compileSdkVersion 21 and buildToolsVersion '21.0.1'.

    In Android Studio, you set these in build.gradle. In ADT, I don't remember how to set them.

    0 讨论(0)
  • 2021-01-01 17:07

    Create a new work space after that try to create a new android project with min sdk 2.3 then it will automatically import your appcompact lib after that it will work thats work with me

    0 讨论(0)
  • 2021-01-01 17:12

    Modify the project.properties file, which has:

    target=android-19
    

    to

    target=android-21
    

    after changes above close project then open and clean

    0 讨论(0)
提交回复
热议问题