且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何为 Android 应用程序设置 IntelliJ IDEA?

更新时间:2022-05-21 02:10:34

我花了一天的时间试图将所有部分放在一起,在数百个站点和教程中,但它们都跳过了微不足道的步骤.

I've spent a day on trying to put all the pieces together, been in hundreds of sites and tutorials, but they all skip trivial steps.

这里是完整指南:

  1. 下载并安装 Java JDK(选择Java平台)
  2. 下载并安装 Android SDK(推荐安装程序)
  3. android SD安装完成后,在Android SDK Tools下打开SDK Manager(有时需要在管理员权限下打开)
  4. 选择所有内容并标记全部接受并安装.
  5. 下载并安装 IntelliJ IDEA(社区版是免费的)
  6. 等待所有下载和安装完成.
  1. Download and install Java JDK (Choose the Java platform)
  2. Download and install Android SDK (Installer is recommended)
  3. After android SD finishes installing, open SDK Manager under Android SDK Tools (sometimes needs to be opened under admin's privileges)
  4. Choose everything and mark Accept All and install.
  5. Download and install IntelliJ IDEA (The community edition is free)
  6. Wait for all downloads and installations and stuff to finish.

新项目:

  1. 运行 IntelliJ
  2. 创建一个新项目(这里有一个教程)
  3. 输入名称,选择Android类型.
  4. 教程中遗漏了一个步骤,当您被要求选择 JDK(在选择 SDK 之前)时,您需要选择您已安装的 Java JDK早些时候.应该在 C:Program FilesJavajdk{version}
  5. 选择一个新平台(如果没有选择),SDK 平台是 C:Program FilesAndroidandroid-sdk-windows 中的 android 平台.
  6. 选择安卓版本.
  7. 现在您可以编写程序了.
  1. Run IntelliJ
  2. Create a new project (there's a tutorial here)
  3. Enter the name, choose Android type.
  4. There's a step missing in the tutorial, when you are asked to choose the JDK (before choosing the SDK) you need to choose the Java JDK you've installed earlier. Should be under C:Program FilesJavajdk{version}
  5. Choose a New platform ( if there's not one selected ) , the SDK platform is the android platform at C:Program FilesAndroidandroid-sdk-windows.
  6. Choose the android version.
  7. Now you can write your program.

编译:

  1. 在您需要选择下拉列表的运行按钮附近,选择编辑配置
  2. 首选 Android 虚拟设备中选择...按钮
  3. 单击创建,为其命名,然后按确定.
  4. 双击新设备以选择它.
  5. 按确定.
  6. 您已准备好运行该程序.
  1. Near the Run button you need to select the drop-down-list, choose Edit Configurations
  2. In the Prefer Android Virtual device select the ... button
  3. Click on create, give it a name, press OK.
  4. Double click the new device to choose it.
  5. Press OK.
  6. You're ready to run the program.