简体   繁体   English

Android N(预览版)在“构建目标”下指的是什么

[英]What does Android N (Preview) refer to under “Build target”

I am using intellij idea for android development. 我正在使用intellij的想法进行android开发。 I presume it is the same thing as android studio. 我想这和android studio是一样的东西。 I imported an existing android project into intellij idea, using the following instructions: 我使用以下说明将现有的android项目导入了intellij idea:

https://www.jetbrains.com/help/idea/2016.1/importing-an-existing-android-project.html?origin=old_help https://www.jetbrains.com/help/idea/2016.1/importing-an-existing-android-project.html?origin=old_help

Under step 8) in the ordered list, I specified the Java SDK 1.8 and continued the import. 在有序列表中的步骤8)下,我指定了Java SDK 1.8并继续导入。 Now when I launched intellij idea, I got the following error: 现在,当我启动intellij idea时,出现以下错误:

Android SDK is not configured for module "X" or corrupted 未为模块“ X”配置Android SDK或已损坏

So I opened the project structure. 因此,我打开了项目结构。 I went to Platform Settings > SDKs. 我去了平台设置> SDK。 Since I already specified the Java SDK during the import, now I need to specify the Android SDK. 由于在导入过程中已经指定了Java SDK,因此现在需要指定Android SDK。 I clicked the + sign and specified Android SDK. 我单击+号并指定Android SDK。 Then I went to the root directory of my SDK install (android-sdk-macosx) and selected that folder. 然后,我进入SDK安装的根目录(android-sdk-macosx)并选择了该文件夹。

Now I get a little popup that says: 现在我弹出一个小窗口,上面写着:

Create New Android SDK
Java SDK: 1.8 
Build target: Android N (Preview)

I have the latest Android SDK (Android 6.0). 我有最新的Android SDK(Android 6.0)。 But I also have Android SDK 4.1.2 to work on older devices. 但是我也有Android SDK 4.1.2可以在旧设备上使用。 But I also use google maps so I have also Google APIs 6.0 and 4.1.2 respectively. 但是我也使用谷歌地图,所以我也分别有谷歌APIs 6.0和4.1.2。

In other words, I have 5 options for Build target: 换句话说,构建目标有5个选项:

Android N (Preview)
Android 6.0
Android 4.1.2
Google APIs 6.0
Google APIS 4.1.2

Which one do I select? 我选择哪一个?

But I also use google maps so I have also Google APIs 6.0 and 4.1.2 respectively 但是我也使用谷歌地图,所以我也分别有谷歌APIs 6.0和4.1.2。

Unless you are using the long-since-deprecated Maps V1 API, you do not need those Google APIs build targets. 除非您使用早已弃用的Maps V1 API,否则您不需要那些Google API构建目标。 Maps V2, the current edition of the Android integration for Google Maps, can be built using a normal build target and the appropriate Play Services SDK. 可以使用常规构建目标和适当的Play Services SDK来构建Maps V2,这是Google Maps Android集成的最新版本。

Which one do I select? 我选择哪一个?

Android 6.0, most likely. Android 6.0,最有可能。 That equates to what in Android Studio would be a compileSdkVersion of 23. 这就等于Android Studio中的compileSdkVersion为23。

Choosing 'N' limits you to testing with the N Developer Preview. 选择'N'将限制您使用N Developer Preview进行测试。 Since you have not mentioned this, I am assuming that this is not your objective. 由于您尚未提及,因此我假设这不是您的目标。

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

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