Android--uses-sdk:minsdkversion cannot is smaller than version L declared in library com.android.support:appcompat-v7 : 21.0.0-rc1

Source: Internet
Author: User

This is an error, is I in the Android studio to add support-v4 and V7 package after the errors, Baidu has not been Baidu for a long time. At that time my project had minsdkversion 19.

Setting the minimum version to L will also make an error, and my test machine is 4.3 and cannot be installed at all.

defaultconfig {...          . ' L ' ....    }
Solutions

1. Set the compilesdkversion as

Compilesdkversion ' Android-l '

This solution applies only to the L version, and if you try to deploy L (< = 4.4.4) on the following devices, the OLD_SDK will burst. In order for the application to work L you still need to use the old V20 support Free + Application compatible + TARGETVERSIONSDK and COMPILEVERSIONSDK

Dependencies {        ' com.android.support:appcompat-v7:20.+ '        com.android.support: support-v4:20.+ '    }    android                {'        defaultconfig ' {            " Com.example.application "                        ten 1            "1.0 "                     }}

2, change Gradle dependecy

This may not work properly, it will only make your app work for Android L. To protect the backward compatibility of older Android OS versions, change the Gradle dependecy.

Compile ' com.android.support:appcompat-v7:20.+ '
I'm the dividing line of the king of the land Tiger.

Android--uses-sdk:minsdkversion cannot is smaller than version L declared in library com.android.support:appcompat-v7 : 21.0.0-rc1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.