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.