When I was debugging and running the Andorid project on my mobile phone today, I found that the Console printed out a warning message like "WARNING: Application does not specify an API level requirement!", as shown in the figure below:
Although it does not affect the normal operation of the project, we still need to find out the reason. I checked the reason for the warning online. It turns out that the Min SDK Version was not specified in the AndroidManifest.xml file when creating the project.
Solution: Modify the AndroidManifest.xml file and add the following code between
<uses-sdk></uses-sdk>
Use android:minSdkVersion to specify the run The minimum SDK version of this Android application, minSdkVersion="8" indicates the version of Android 2.2 used, android:targetSdkVersion indicates the SDK version used to compile this Android application, targetSdkVersion="21" indicates the version of Android 5.0.1 used.
After adding the configuration item of the <uses-sdk></uses-sdk> node, if the
<uses-sdk></uses-sdk>
The above is the detailed content of Examples of problems encountered in Android development. For more information, please follow other related articles on the PHP Chinese website!