简体   繁体   English

错误:未设置ANDROID_HOME。 如果已设置,请注意环境变量与ANDROID_SDK冲突

[英]Error:ANDROID_HOME is not set. If it has been set, please be aware environment variable conflict with ANDROID_SDK

When i run build.gradle in as, warning "Error:ANDROID_HOME is not set. If it has been set, please be aware environment variable conflict with ANDROID_SDK. Expression: false" and build failed. 当我在运行build.gradle时,警告“未设置错误:ANDROID_HOME。如果已设置,请注意环境变量与ANDROID_SDK冲突。表达式:false”,并且构建失败。

So i check my system variables, the ANDROID_HOME is exist. 所以我检查我的系统变量,ANDROID_HOME是否存在。

Anyone who knows how to solve this problem? 有谁知道如何解决这个问题?

Please once check your environmental variable path and android studio SDK path should be same. 请一次检查您的环境变量路径和android studio SDK路径应相同。 Consider this case, If you are having two SDK folders one is target to Android studio another one for environmental variable, At the time this kind of problems may occur. 考虑这种情况,如果您有两个SDK文件夹,一个是Android Studio的目标文件夹,另一个是环境变量的目标文件夹,那么此时可能会出现这种问题。 Any way once reset both places path (ie Android Studio, Environmental Variable) properly then restart PC and check. 任何方法一旦正确重置两个放置路径(即Android Studio,环境变量),然后重新启动PC并进行检查。

for setting ANDROID_HOME Follow this link 用于设置ANDROID_HOME的链接

for windows: 对于Windows:

set ANDROID_HOME=C:\\\\android-sdk-windows 设置ANDROID_HOME = C:\\\\ android-sdk-windows

set PATH=%PATH%;%ANDROID_HOME%\\tools;%ANDROID_HOME%\\platform-tools 设置PATH =%PATH%;%ANDROID_HOME%\\ tools;%ANDROID_HOME%\\ platform-tools

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:未设置 ANDROID_HOME 环境变量 - ERROR : The ANDROID_HOME environment variable is not set 找不到 adb 请使用 Android SDK 根目录路径设置 ANDROID_HOME 环境变量 - Could not find adb Please set the ANDROID_HOME environment variable with the Android SDK root directory path 找不到ADB。 请使用Android SDK根目录路径设置ANDROID_HOME环境变量 - Could not find adb. Please set the ANDROID_HOME environment variable with the Android SDK root directory path 如何设置ANDROID_HOME环境变量? - How to set the ANDROID_HOME environment variable? 未设置环境变量ANDROID_HOME - Environment variable ANDROID_HOME is not set 在mac中设置ANDROID_HOME环境变量 - Set ANDROID_HOME environment variable in mac ionic2:错误:找不到Android SDK。 确保已安装。 如果它不在默认位置,请设置ANDROID_HOME环境变量 - ionic2: Error: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable 错误:找不到Android SDK。 确保已安装。 如果它不在默认位置,请设置ANDROID_HOME环境变量 - Error: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable 找不到Android SDK。 确保已安装。 如果它不在默认位置,请设置ANDROID_HOME环境变量 - Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable Android:将local.properties中的sdk.dir设置为ANDROID_HOME环境变量 - Android: set sdk.dir in local.properties to ANDROID_HOME environment variable
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM