Android Error: This template requires a build target API version of at least 14, and the current version is 7

旧街凉风 提交于 2019-12-11 12:16:12

问题


I installed the SDK and I like work with API 7 but when I want to create a new Activity Main I have this problem and I can't create a new Activity, thanks.

This template requires a build target API version of at least 14, and the current version is 7

In the log, I can read this:

Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details.


回答1:


I recently faced the same problem when creating the activity or while setting the new android application project and able to solve this problem in this manner. I checked the system image folder which is in sdk/system-images,build tools folder-sdk/build-tools and found that these folder does not have the API's that i am using at Minimum required sdk,target sdk,compile with. In each of these you need to provide the API no. or Android version. So check that the API's that you are using for(Minimum required sdk,target sdk,compile with) are installed and also check the system-images and build-tools folder should have these API's

if you have done this your problem must be solved.




回答2:


You probably set Build SDK to API 7. Normally, you should set Build SDK to the highest possible API level and set the other SDK, it's called Run SDK or don't rememeber how to the minimum API version you want your application to run on.




回答3:


It's an Android Lint warning that tells that you should consider updating targetSdkVersion to the latest API level (19 as of now). It's because your target SDK level is lower than your build SDK (defined in project.properties on Eclipse/ADT-based tooling).




回答4:


I ran into this same issue even though I had set in my AndroidManifest.xml minSdkVerion to 13 and targetSdkVersion to 19. What fixed it for me was in Eclipse going to Project > Properties > Android then checking the highest API level in Project Build Target box (API 19 for me).



来源:https://stackoverflow.com/questions/23755101/android-error-this-template-requires-a-build-target-api-version-of-at-least-14

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!