After writing the demo, I found that the console printed a phrase like this: [INSTALL_FAILED_OLDER_SDK] Error.
The reason is that the Android version number of the test machine or the virtual machine we are using is too low.
defaultconfig { ApplicationID "Com.example.demo" minsdkversion targetsdkversion 1 Versionname "1.0" }
Like me this configuration can only install Android 5.0 or more on the system. At 5.0, you can't install it.
So when you run into project execution when you print out [INSTALL_FAILED_OLDER_SDK] in the console, we should go to the Androidmanifest.xml file to find it.
。
Android Studio is in Build.gradle
<USES-SDK android:minsdkversion= "android:targetsdkversion="/>
Because your minsdkversion version number is set too high to cause.
So we should be able to adjust the minsdkversion to the appropriate version number. Like I was directly adjusted to 10. There's no problem.
<USES-SDK android:minsdkversion= "ten" android:targetsdkversion= "/>"
[INSTALL_FAILED_OLDER_SDK] Error