代码之家  ›  专栏  ›  技术社区  ›  Michael Osofsky

gradlew在哪里寻找android sdk?

  •  0
  • Michael Osofsky  · 技术社区  · 6 年前

    我怎么知道哪个android sdk gradlew使用?例如,当我运行 ./gradlew dist ,我如何判断它在我的磁盘上查找android sdk的位置?

    类似的问题是 Where is android SDK location? 但它已经过时了,并没有特别询问格雷德。

    1 回复  |  直到 6 年前
        1
  •  0
  •   Michael Osofsky    6 年前

    好像 ./gradlew dist 查找local.properties中引用的android sdk sdk.dir 参数。

    我通过改变 sdk.dir开发包 无效目录的参数( /Users/me/Library/Android/ZZZsdk )运行时出现了以下错误 /梯度距离 以下内容:

    my-project[develop]08:48:11 ./gradlew dist
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    A problem occurred configuring project ':app'.
    > The SDK directory '/Users/me/Library/Android/ZZZsdk' does not exist.
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    
    * Get more help at https://help.gradle.org
    
    BUILD FAILED in 0s
    
    推荐文章