美文网首页
MacOS下Jenkins 无法找到android sdk跟nd

MacOS下Jenkins 无法找到android sdk跟nd

作者: RemiscreRoy | 来源:发表于2019-12-18 15:13 被阅读0次

    错误信息:

    Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.

    16:15:42.665 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/Users/XXX/Jenkins/Home/workspace/XXX/local.properties'.

    原因:

    jenkins无法访问本机用户目录.

    解决:

    1.Copy your Android folder \Users{yourUser}\Library\Android\

    2.Paste in the folder \Users\Shared\Jenkins\Library

    3.Go to Jenkins -> Manage Jenkins -> Configure System

    4.Check "Environment variables"

    5.add name: ANDROID_HOME, value -> \Users\Shared\Jenkins\Library\Android\sdk

    6.Add

    7.Save

    Jenkins build failed due to missing android SDK - Stack Overflow

    相关文章

      网友评论

          本文标题:MacOS下Jenkins 无法找到android sdk跟nd

          本文链接:https://www.haomeiwen.com/subject/dxwsgftx.html