简体   繁体   English

Android系统。 如何为应用程序和Min SDK版本设置构建目标?

[英]Android. How correct to set Build Target for application and Min SDK version?

I want to use in my application classes from API Level 11. Which in this case I define value of Build Target? 我想在API级别11的应用程序类中使用。在这种情况下,我定义了Build Target的值? How are related Build Target of application and the minimum version of SDK? 应用程序的最低构建版本与SDK的最低版本有何关系? I would be very grateful for the help! 我将非常感谢您的帮助!

Build Target is used to choose the android.jar of the platform version which will be used to compile the code. Build Target用于选择将用于编译代码的平台版本的android.jar。

minSdkVersion is defined in the manifest file and used by Android Market to filter out apps, it has nothing to do with the compile time or runtime behaviour minSdkVersion在清单文件中定义,并由Android Market用于过滤应用程序,它与编译时或运行时行为无关

You can set the minimum sdk value of your project inthe Android manifest 您可以在Android清单中设置项目的最小sdk值

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="tfe.rma.ciss.be"
      android:versionCode="1"
      android:versionName="1.0">
      <uses-sdk android:minSdkVersion="8" />
      </manifest>

and if you want to specify a specific emulator or phone which will compile the code (in this case, the build target you are asking about) , go to 如果要指定一个特定的仿真器或电话来编译代码(在这种情况下,您要询问的构建目标),请转到

  1. right click on your project 右键点击您的项目
  2. choose, click on properties 选择,单击属性
  3. choose Android 选择Android
  4. choose the api of the emulator 选择模拟器的API

Greetings ! 问候 !

NB: Bear in mind that your built target must have a greater or at least the same value than your minSDK version 注意:请记住,您所建立的目标必须具有比minSDK版本更大或至少相同的值

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM