简体   繁体   English

安装Android构建工具版本19.1.0

[英]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,但是您可以从此列表中的问题位置进行选择。

  1. Download and install Android SDK for you platform. 为您的平台下载并安装Android SDK。 I'm on Mac so will present instructions from that perspective. 我在Mac电脑上,因此将从该角度提出说明。
  2. Go to Configuration on login splash screen or Preferences through File or Apple menu. 转到登录初始屏幕上的“ Configuration ,或通过“文件”或“ Apple”菜单进入“首选项”。
  3. Go to Appearance and Behaviour > System Settings > Android SDK 转到Appearance and Behaviour > System Settings > Android SDK
  4. Observe the Android SDK Location . 观察Android SDK Location Mine is /Users/me/Library/Android/sdk 我的是/Users/me/Library/Android/sdk
  5. Open ~/.profile 打开~/.profile
  6. Add export ANDROID_HOME=/Users/me/Library/Android/sdk 添加export ANDROID_HOME=/Users/me/Library/Android/sdk
  7. Add export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools 添加export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
  8. Save and source ~/.profile 保存并获取source ~/.profile

You could have the additional problem of not having Gradle installed. 您可能还有没有安装Gradle的其他问题。 Try: 尝试:

  1. Download the binary 下载二进制文件
  2. Extract to /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我在本地安装此类文件的地方)
  3. sym link the version of gradle - cd /usr/local;ln -s gradle-3.5 gradle 符号链接gradle的版本-cd cd /usr/local;ln -s gradle-3.5 gradle
  4. Add /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.

相关问题 Ionic Aangular:未找到已安装的构建工具。 安装 Android 构建工具版本 19.1.0 或更高版本 - Ionic Aangular :No installed build tools found. Install the Android build tools version 19.1.0 or higher ionic cordova bulid android:未找到已安装的构建工具。 安装 Android 构建工具版本 19.1.0 或更高版本 - ionic cordova bulid android : No installed build tools found. Install the Android build tools version 19.1.0 or higher Cordova运行错误-找不到安装的生成工具。 安装Android构建工具版本19.1.0或更高版本 - Cordova run error - No installed build tools found. Install the Android build tools version 19.1.0 or higher “Gradle 同步失败:未找到已安装的构建工具。安装 Android 构建工具版本 19.1.0 或更高版本” - "Gradle sync failed: No installed build tools found. Install the Android build tools version 19.1.0 or higher" 已安装 Ionic 构建工具但收到错误“未找到已安装的构建工具。安装 Android 构建工具版本 19.1.0 或更高版本。” - Ionic build tools installed but receiving error "No installed build tools found. Install the Android build tools version 19.1.0 or higher." 构建工具错误“请安装Android构建工具版本19.1.0或更高版本” - Build tool error “Please install the Android build tools version 19.1.0 or higher” 在 Visual Studio 中使用 ionic + Cordova 我不断收到“找不到已安装的构建工具。安装 Android 构建工具版本 19.1.0 或更高版本。” - Using ionic + Cordova in visual studio i keep getting "No installed build tools found. Install the Android build tools version 19.1.0 or higher." 更新后的Android Studio构建工具19.1.0 - Android Studio after updating to build tools 19.1.0 如何强制Android Studio 0.6.0使用SDK Build Tools 19.1.0 - how to force Android Studio 0.6.0 to use SDK Build Tools 19.1.0 离子构建时间错误“未找到已安装的构建工具。安装 Android 构建工具版本 30.0.3 或更高版本” - Ionic build time error "No installed build tools found. Install the Android build tools version 30.0.3 or higher"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM