简体   繁体   English

错误:配置项目':app'时发生错误。 > SDK目录不存在

[英]Error:An error occurred configuring project ':app'. > The SDK directory does not exist

i am importing one project. 我正在导入一个项目。 i am running this on linux. 我在linux上运行它。 but when i build my project it gives me this error. 但是当我建立我的项目时,它给了我这个错误。

**Error:A problem occurred configuring project ':app'. **错误:配置项目':app'时发生问题。

The SDK directory '/home/custom/Documents/Zebra_RFID_Mobile-1.0.2.17/C:\\Users\\DHXW76\\AppData\\Local\\Android\\Sdk' does not exist.** SDK目录'/home/custom/Documents/Zebra_RFID_Mobile-1.0.2.17/C:\\Users\\DHXW76\\AppData\\Local\\Android\\Sdk'不存在。**
Below is my local.properties file 以下是我的local.properties文件

## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Mon Sep 11 14:54:05 IST 2017
ndk.dir=/home/custom/Android/Sdk/ndk-bundle
sdk.dir=/home/custom/Android/Sdk   

I am wondering that how is this error showing c:\\users.... path, although i am trying it to run this on linux. 我想知道这个错误如何显示c:\\ users ....路径,尽管我正在尝试在Linux上运行它。 I have also checked my sdk location, it is perfect. 我还检查了我的SDK位置,这是完美的。 can anybody help me solve this issue? 有人可以帮我解决这个问题吗?

I had this problem. 我有这个问题。 I'm using Linux. 我正在使用Linux。 Project stucture windows 项目结构窗口

How I corrected the error: 我如何纠正错误:

  1. Need to check SDK Manager. 需要检查SDK Manager。 Is the SDK similar to your project? SDK与您的项目相似吗? SDK Manager SDK管理器

2.Checking Gradle. 2.检查Gradle。 Gradle Folder Gradle The version number in the Project Structure /project and in the /opt/android-studio/gradle/gradle-4.6/ folder should be the same. Gradle文件夹 Gradle项目结构/ project和/opt/android-studio/gradle/gradle-4.6/文件夹中的版本号应该相同。 If the problem persists, update the Gradle. 如果问题仍然存在,请更新Gradle。

2.1 We go to the site: https://gradle.org/install/#with-a-package-manager and download the binary version. 2.1我们转到以下站点: https : //gradle.org/install/#with-a-package-manager并下载二进制版本。 Download the archive we throw in the folder /opt/android-studio/gradle/gradle-4.6/ and write down its version number in Project Structure /project. 下载我们放入/opt/android-studio/gradle/gradle-4.6/文件夹中的/opt/android-studio/gradle/gradle-4.6/并在Project Structure / project中写下其版本号。

3.Restart the studio. 3.重新启动工作室。

If the program code shows an incorrect version of Gradle, then an error will appear that is difficult to fix. 如果程序代码显示了不正确的Gradle版本,则将出现难以修复的错误。 Try to check all the code or create a new project. 尝试检查所有代码或创建一个新项目。

Check Gradle easily by creating a new project. 通过创建新项目轻松检查Gradle。 I like this method. 我喜欢这种方法。

暂无
暂无

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

相关问题 错误:发生配置项目“:app”。 安卓应用 - Error:A occurred configuring project ':app'. Android app 错误:发生了配置项目 - Error : occurred configuring project Android - 错误:配置项目“:app”时发生问题 - Android - Error:A prblem occurred configuring project ':app' 配置项目':app'时出现Android 3.1 build gradle 4.4错误 - Android 3.1 build gradle 4.4 error occurred configuring project ':app' Flutter:gradle 构建失败,错误为“评估根项目 'android' 时出现问题 > 配置项目 ':app' 时出现问题。” - Flutter:gradle build failed with error "A problem occurred evaluating root project 'android' > A problem occurred configuring project ':app'." 配置项目 ':app' (org.gradle.api.ProjectConfigurationException) 时发生错误并且还发现错误 ASCII - Error occurred when configuring project ':app' (org.gradle.api.ProjectConfigurationException) and ERROR ASCII also found 在Android中构建本地本机应用程序时出错:SDK目录不存在 - Error building react-native first app in Android: The SDK directory does not exist Bamboo with Android Project:SDK目录不存在 - Bamboo with Android Project: The SDK directory does not exist 配置项目“:app”时出现问题。 在 react-native 中并给出一些字节码作为错误 - A problem occurred configuring project ':app'. in react-native and give some byte code as an error React native 集成应用程序expo配置错误配置项目':expo'时出现问题 - React native integrated app expo configuration error A problem occurred configuring project ':expo'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM