The SDK path ‘UserscmmLibraryAndroidsdk‘ does not belong to a directory. Android Studio will u

The SDK path ‘UserscmmLibraryAndroidsdk‘ does not belong to a directory. Android Studio will u,第1张

android studio导入旧项目后出现窗口上报错提示:

The SDK path
'\Users\cmm\Library\Android\sdk'
does not belong to a directory.

Android Studio will use this Android SDK instead:
'C:\Users\Administrator\AppData\Local\Android\Sdk'
and will modify the project's local.properties file.

错误在哪,我不说多,直接说吧

要改插件与Gradle
一、project的build.gradle中:

classpath 'com.android.tools.build:gradle:x.x.x'

二、gradle\wrapper\gradle-wrapper.properties中:

distributionUrl=https\://services.gradle.org/distributions/gradle-x.x.x-x.zip

三、app的build.gradle中:

    ......
    compileSdkVersion xx
    buildToolsVersion "xxx"
    ......
    targetSdkVersion xx
    ......
implementation 'com.android.support:appcompat-v7:xx.x.x'
    ......

如何改插件与Gradle,点击链接:Android Studio 详细的插件与Gradle的关系(建议收藏)

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/992149.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存