[英]How do I set up IntelliJ IDEA for Android applications?
如何为Android应用程序设置IntelliJ IDEA?
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. 我花了整整一天的时间尝试将所有内容组合在一起,涉及数百个站点和教程,但是它们都跳过了琐碎的步骤。
So here's the full guide: 因此,这里是完整的指南:
New Project: 新项目:
C:\\Program Files\\Java\\jdk{version}
C:\\Program Files\\Java\\jdk{version}
C:\\Program Files\\Android\\android-sdk-windows
. C:\\Program Files\\Android\\android-sdk-windows
的android平台。 Compiling: 编译:
The 5th step in "New Project' has apparently changed slightly since. 从那以后,“新项目”中的第五步显然有所变化。
Where it says android sdk then has the drop down menu that says none, there is no longer a 'new' button. 然后显示android sdk的下拉菜单中没有任何内容,不再有“新”按钮。
5.) 5.)
Once I have followed all these steps, I start to receive error messages in all android classes calls like: 完成所有这些步骤后,我开始在所有android类调用中收到错误消息,例如:
I revolved that including android.jar in the SDKs Platform Settings: 我讨论了在SDK平台设置中包括android.jar的问题:
Just in case someone is lost. 以防万一有人迷路了。 For both new application or existing ones go to File->Project Structure.
对于新应用程序还是现有应用程序,请转到文件->项目结构。 Then in Project settings on the left pane select Project for the Java SDK and select Modules for Android SDK.
然后在左窗格的项目设置中,为Java SDK选择项目,然后为Android SDK选择模块。
I had some issues that this didn't address in getting this environment set up on OSX. 在OSX上设置此环境时,我遇到了一些无法解决的问题。 It had to do with the solution that I was maintaining having additional dependencies on some of the Google APIs.
这与我维持对某些Google API的其他依赖关系的解决方案有关。 It wasn't enough to just download and install the items listed in the first response.
仅下载并安装第一个响应中列出的项目还不够。
You have to download these. 您必须下载这些。
Another way to identify the correct SDK is to install Android Studio, create a new project, go to project structure, SDK Location and find where the SDK was installed. 识别正确的SDK的另一种方法是安装Android Studio,创建新项目,转到项目结构,SDK位置并找到SDK的安装位置。
I found using the default installation process on a mac that the SDK home folder was in the /Users/'yourUser'/Library/Android/sdk
folder. 我发现在Mac上使用默认安装过程时,SDK主文件夹位于
/Users/'yourUser'/Library/Android/sdk
文件夹中。 Make sure you have enabled your Mac to view the Library folder. 确保已启用Mac来查看“ 库”文件夹。
You just need to install Android development kit from http://developer.android.com/sdk/installing/studio.html#Updating 您只需要从http://developer.android.com/sdk/installing/studio.html#Updating安装Android开发工具包
and also Download and install Java JDK (Choose the Java platform) 并下载并安装Java JDK(选择Java平台)
define the environment variable in windows System setting https://confluence.atlassian.com/display/DOC/Setting+the+JAVA_HOME+Variable+in+Windows 在Windows中定义环境变量系统设置https://confluence.atlassian.com/display/DOC/Setting+the+JAVA_HOME+Variable+in+Windows
Voila ! 瞧! You are Donezo !
你是Donezo!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.