幻の上帝吧 关注:328贴子:3,165
  • 8回复贴,共1
喂熊。


IP属地:北京1楼2019-10-25 18:51回复
    手贱编译个 scrcpy 玩玩。以下是各种坑。
    首先 git clone 最后抽风失败。知道各种抽风是 MSYS2 git 的老问题,终于忍无可忍,干掉换回 GitHub Windows 打包的 git ,正常。顺便设置好 JAVA_HOME 确保 PATH 里要的 javac 。
    然后官方用的 MSYS2 ,又是个依赖 py 的屑构建系统……不过居然意外地没多抽风。不过 ninja 失败后其中的命令不会显示错误信息得手动贴一遍重新跑,这个就有点火大了。
    先是 gradle.org 域名解析不到下载失败…… pacman 装 gradle 没用,手动贴下载路径倒是能下载,复制到 $HOME/.gradle/wrapper/dists 下好像不认,但是再 ninja 莫名其妙认识域名自动下载了,姑且算解决。
    然后重新开 mintty 发现又死活 fork 不出子进程了,strace 了下各种 c0000005 ,最后死马当活马医关掉 bash 进 ash 然后 rebaseall 居然正常了,现在 ASLR 问题还随机的吗?


    IP属地:北京2楼2019-10-25 19:00
    回复
      中间重开 mintty 是因为找不到 ANDROID_SDK_ROOT 。以前用的 ANDROID_SDK ,没怎么管,加到初始化脚本重新打开就炸了。
      之后仍然是 Android SDK 出奇葩问题:
      > Configure project :server
      Checking the license for package Android SDK Build-Tools 28.0.3 in D:\Android\sdk\licenses
      Warning: License for package Android SDK Build-Tools 28.0.3 not accepted.
      FAILURE: Build failed with an exception.
      * What went wrong:
      A problem occurred configuring project ':server'.
      > Failed to install the following Android SDK packages as some licences have not been accepted.
      build-tools;28.0.3 Android SDK Build-Tools 28.0.3
      To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
      Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
      Using Android SDK: D:\Android\sdk
      * 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.
      草……


      IP属地:北京3楼2019-10-25 19:02
      回复
        > Task :server:lintVitalRelease FAILED
        FAILURE: Build failed with an exception.
        * What went wrong:
        Execution failed for task ':server:lintVitalRelease'.
        > Could not resolve all files for configuration ':server:lintClassPath'.
        > Could not resolve org.codehaus.groovy:groovy-all:2.4.15.
        Required by:
        project :server > com.android.tools.lint:lint-gradle:26.4.2
        > Could not resolve org.codehaus.groovy:groovy-all:2.4.15.
        > Could not get resource 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.pom'.
        > Could not GET 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.pom'.
        > 这是在主机名解析时▒?▒常出现的暂时错误,它意味着本地服务器没有从权威服务器上收到响应▒? (jcenter.bintray.com)
        > Could not resolve org.jetbrains.trove4j:trove4j:20160824.
        Required by:
        project :server > com.android.tools.lint:lint-gradle:26.4.2 > com.android.tools.external.com-intellij:intellij-core:26.4.2
        > Could not resolve org.jetbrains.trove4j:trove4j:20160824.
        > Could not get resource 'https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom'.
        > Could not GET 'https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom'.
        > jcenter.bintray.com
        > Could not resolve com.google.errorprone:error_prone_annotations:2.1.3.
        Required by:
        project :server > com.android.tools.lint:lint-gradle:26.4.2 > com.android.tools.lint:lint:26.4.2 > com.google.guava:guava:26.0-jre
        > Could not resolve com.google.errorprone:error_prone_annotations:2.1.3.
        > Could not get resource 'https://jcenter.bintray.com/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.pom'.
        > Could not GET 'https://jcenter.bintray.com/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.pom'.
        > jcenter.bintray.com
        * 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
        Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
        Use '--warning-mode all' to show the individual deprecation warnings.
        See https://docs.gradle.org/5.5.1/userguide/command_line_interface.html#sec:command_line_warnings
        mdzz
        坑了


        IP属地:北京4楼2019-10-25 19:04
        回复
          "bash" "E:/Source/Genymobile/scrcpy/server/./scripts/build-wrapper.sh" "E:/Source/Genymobile/scrcpy/server" "server/scrcpy-server.jar" "release"
          单独用 bash 和 cmd 去跑都正常,可以成功……然鹅继续回过来编译会发现还是莫名其妙失败:
          [0/1] Generating scrcpy-server with a custom command.
          /bin/bash: E:/Source/Genymobile/scrcpy/server/./scripts/build-wrapper.sh: No such file or directory
          FAILED: server/scrcpy-server.jar
          "bash" "E:/Source/Genymobile/scrcpy/server/./scripts/build-wrapper.sh" "E:/Source/Genymobile/scrcpy/server" "server/scrcpy-server.jar" "release"
          ninja: build stopped: subcommand failed
          ……这就十分见鬼了。
          懒得整 adb ,先坑一段时间。


          IP属地:北京5楼2019-10-26 15:40
          回复
            看不懂啊


            来自Android客户端6楼2019-11-22 10:48
            回复
              gradle 翻墙啊, msys2 翻墙哈, 实在不行, 系统env里 HTTPS_PROXY


              IP属地:河南8楼2019-12-06 08:33
              收起回复