2016-11-13 80 views
0

我试过用离子实验室。我试图建立一个简单的空白应用程序使用实验室,但是当我去建立我的android应用程序它说我需要有android sdk。我已经有android sdk和平台工具。如果你想知道,我甚至会加入到我的路线中。通过查看“离子的android构建错误 - 未能找到android_home”(这是我检查我的环境路径时),试图通过研究我的问题后,我被亲切地送到这里寻求帮助。我拍了两个屏幕截图(环境和离子实验室控制台的错误)。 errorenvironment离子不能找到android

+0

哦,我差点忘了:OS - windows10,androidSDKv:22和24的离子构建Android命令不工作,虽然*我有一个不同的项目,虽然进行测试。也许离子实验室是问题,我不应该使用它? –

回答

0
For windows:-- 
set ANDROID_HOME=C:\<installation location>\android-sdk-windows 
set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools 
The Android SDK download does not include specific Android platforms. To run the code in this guide, you need to download and install the latest SDK platform. You do this by using the Android SDK and AVD Manager that you installed in the previous section. 

Open the Android SDK Manager window: 

android 
Note: If this command does not open the Android SDK Manager, then your path is not configured correctly. 
Select the Tools checkbox. 
Select the checkbox for the latest Android SDK. 
From the Extras folder, select the checkbox for the Android Support Library. 
Click the Install packages... button to complete the download and installation. 

Note: You may want to install all the available updates, but be aware it will take longer, as each API level is a large download. 
+0

谢谢阁下的Windows命令。不幸的是,它没有奏效。没有提供版本。从config.xml中检索版本... 添加android项目...'节点'不被识别为内部或外部命令,可操作程序或批处理文件。我检查节点并做了“SET PATH = C:\ Program Files \ Nodejs;%PATH%”仍然没有工作 命令以错误代码1结束:cmd/s/c“C:\ Users \ Khanh \ .cordova \ lib \ npm_cache \ cordova-android \ 4.0.2 \ package \ bin \ create.bat --cli D:\ stackFails \ platforms \ android com.ionicframework.stackfails867190 SimpleHello“ –

+0

谢谢,但我已经回答了感谢您的帮助 –

0

请问您可以在终端做以下的事情。这可能对您有所帮助。

Step:--1 
export ANDROID_HOME=~/android-sdk-macosx 
PATH=$PATH:$ANDROID_HOME/tools 
PATH=$PATH:$ANDROID_HOME/platform-tools 

Step:--2 
Update SDK and go to directiory and set your SDK path properly. 
+0

你的意思是命令行?我很抱歉,但我不认为我有Windows上的终端10 –