Mac安装uiautomatorwd build失败,没有apk
直接build出现的问题是 A problem occurred configuring root project 'uiautomatorwd'.
Could not resolve all dependencies for configuration ':classpath'. Could not resolve com.android.tools.build:gradle:2.3.1. Required by: project : > Could not resolve com.android.tools.build:gradle:2.3.1. > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.1/gradle-2.3.1.pom'. > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.1/gradle-2.3.1.pom'. > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/108.168.243.150] failed: Operation timed out (Connection timed out)
然后 1.修改了uiautomatorwd/build.gradle repositories 添加内部maven 仓库,但是里面只有gradle 2.3.0 于是改成 classpath 'com.android.tools.build:gradle:2.3.0'
2.修改了uiautomatorwd/app下面的build.gradle android节点下添加了 lintOptions { abortOnError false }
出现问题:
gradle build
Starting a Gradle Daemon, 1 busy and 1 stopped Daemons could not be reused, use --status for details IOException: https://dl.google.com/android/repository/addons_list-3.xml java.net.ConnectException: Operation timed out (Connection timed out) IOException: https://dl.google.com/android/repository/addons_list-2.xml java.net.ConnectException: Operation timed out (Connection timed out) IOException: https://dl.google.com/android/repository/addons_list-1.xml java.net.ConnectException: Operation timed out (Connection timed out) Failed to download any source lists! java.net.ConnectException: Operation timed out (Connection timed out) Failed to fetch URL http://android.oa.com/android/repository/addon.xml/sys-img.xml, reason: File not found Failed to fetch URL: File not found
FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApkCopy'. Could not resolve org.nanohttpd:nanohttpd:2.3.1. Required by: project :app > Could not resolve org.nanohttpd:nanohttpd:2.3.1. > Could not get resource 'https://jcenter.bintray.com/org/nanohttpd/nanohttpd/2.3.1/nanohttpd-2.3.1.pom'. > Could not GET 'https://jcenter.bintray.com/org/nanohttpd/nanohttpd/2.3.1/nanohttpd-2.3.1.pom'. > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/75.126.118.188] failed: Operation timed out (Connection timed out) Could not resolve com.alibaba:fastjson:1.2.31. Required by: project :app > Could not resolve com.alibaba:fastjson:1.2.31. > Could not get resource 'https://jcenter.bintray.com/com/alibaba/fastjson/1.2.31/fastjson-1.2.31.pom'. > Could not GET 'https://jcenter.bintray.com/com/alibaba/fastjson/1.2.31/fastjson-1.2.31.pom'. > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/108.168.243.150] failed: Operation timed out (Connection timed out)
- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 11 mins 27.89 secs
----------------------------------macaca doctor--------------- FIFINLI-MC1:~ fifinli$ macaca doctor
macaca-doctor version: 1.1.4
Node.js checklist:
node env: /usr/local/Cellar/node/7.10.0/bin/node node version: v7.10.0
iOS checklist:
Xcode is installed at: /Applications/Xcode.app/Contents/Developer
Xcode Command Line Tools is ready, version: 2347.
iproxy[usbmuxd] is installed at: /usr/local/bin/iproxy
ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy
carthage is installed, version: 0.22.0
Android checklist:
JAVA version is 1.8.0_121
JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
ANDROID_HOME is set to /Users/fifinli/Documents/sdk
Platforms is set to /Users/fifinli/Documents/sdk/platforms/android-25
Android tools is set to /Users/fifinli/Documents/sdk/tools/android
ADB tool is set to /Users/fifinli/Documents/sdk/platform-tools/adb
gradle is installed, version: 3.5
Installed driver list:
chrome: 1.0.5 electron: 1.1.6 ios: 1.0.67
@xudafeng
@Uglena 网络问题?