Android studio Failure [INSTALL_FAILED_OLDER_SDK], installandroidsdk

Source: Internet
Author: User

Android studio Failure [INSTALL_FAILED_OLDER_SDK], installandroidsdk

Problem description:

The error "Failure [INSTALL_FAILED_OLDER_SDK]" is reported if you want to run a program written in Android 2.3.3 (the corresponding sdk version is 10.

 

Analysis and Solution Process:

This is because the "minSdkVersion" is defined in the "AndroidManifest. xml" file under the program source code. You can delete it to solve the problem.

However, "AndroidManifest. there is no "minSdkVersion" content in the root of the xml file, and you can find it in each directory of the source code, it is found that "AndroidManifest" is also found in the "app \ build \ intermediates \ manifests \ full \ debug" directory. xml file, which defines the following content:

<Uses-sdk android: minSdkVersion = "16" android: targetSdkVersion = "21"/>

Immediately change the above two values to 10, run the problem again, and the file is restored to the version before modification. It can be seen that this file is automatically generated at each compilation, and the source is not here!

But there is no other xml file, so look for a non-xml file, open it in text to see if there are related definitions, and finally find that there is a "build" under the app directory of the program source code. the content of the gradle file is as follows:

After the two values are changed to 10, the program can run on the android 2.3.3 virtual device!

 

Solution:

Modify the "build. gradle" file in the app directory of the source code, and change minSdkVersion and targetSdkVersion to the same version as the android API version of the virtual device.

 

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.