[英]Install the Android build tools version 19.1.0
I run ionic run android and it starts to download lots of things except gradle
that i downloaded it and set the path myself, now i have 2 question: 我运行ionic run android,它开始下载很多东西,除了
gradle
我自己下载并设置路径外,现在我有2个问题:
1: Should ionic framework always download lots of things with every new project? 1:离子框架是否应该在每个新项目中始终下载大量内容?
and 和
2: How i resolve the below error , i set ANDROID_PATH
variable to point Android-SDK where packages exist 2:如何解决以下错误,我将
ANDROID_PATH
变量设置为指向存在软件包的Android-SDK
What went wrong: 什么地方出了错:
A problem occurred evaluating root project 'android': 评估根项目“ android”时发生问题:
No installed build tools found. Install the Android build tools version 19.1.0
or higher.
The answer is yes (through Gradle) and you have to set ANDROID_HOME
and then add to PATH
based on this. 答案是肯定的(通过Gradle),您必须设置
ANDROID_HOME
,然后基于此添加到PATH
。
On the Mac I had much the same problem. 在Mac上,我遇到了同样的问题。 I was lacking the Android SDK.
我缺少Android SDK。 I don't know if that was your problem.
我不知道那是不是你的问题。 I'll assume you don't have the SDK but you can pick up from your problem place in this list.
我假设您没有SDK,但是您可以从此列表中的问题位置进行选择。
Configuration
on login splash screen or Preferences through File or Apple menu. Configuration
,或通过“文件”或“ Apple”菜单进入“首选项”。 Appearance and Behaviour > System Settings > Android SDK
Appearance and Behaviour > System Settings > Android SDK
Android SDK Location
. Android SDK Location
。 Mine is /Users/me/Library/Android/sdk
/Users/me/Library/Android/sdk
~/.profile
~/.profile
export ANDROID_HOME=/Users/me/Library/Android/sdk
export ANDROID_HOME=/Users/me/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
source ~/.profile
source ~/.profile
You could have the additional problem of not having Gradle installed. 您可能还有没有安装Gradle的其他问题。 Try:
尝试:
/usr/local
or wherever you can write (eg. ~/lib
where I install such things locally) if you don't have admin rights /usr/local
或您可以写的任何地方(例如~/lib
我在本地安装此类文件的地方) cd /usr/local;ln -s gradle-3.5 gradle
cd /usr/local;ln -s gradle-3.5 gradle
/usr/local/gradle
to your $PATH
like above and source ~/.profile
again. /usr/local/gradle
添加到$PATH
,然后再次获取source ~/.profile
。 I reread the question and realised I had added too much detail in my answer. 我重新阅读了问题,并意识到我在回答中添加了太多细节。 I believe the
$ANDROID_HOME
and path line is what you are missing. 我相信
$ANDROID_HOME
和path行是您所缺少的。
You may also need to open Android Studio and do whatever configuration it requires. 您可能还需要打开Android Studio并进行所需的任何配置。 And setup a SDK Platform also in that configuration window discussed above.
并在上面讨论的配置窗口中设置一个SDK平台。
I hope that helps. 希望对您有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.