好久沒有使用weexplus publish android 打包apk, 今一運行失敗了,提示Could not resolve com.android.tools.lint:lint-kotlin:26.2.0.
錯誤日誌:
Download https://maven.google.com/com/android/tools/lint/lint-checks/26.2.0/lint-checks-26.2.0.pom
Download https://maven.google.com/com/android/tools/lint/lint-api/26.2.0/lint-api-26.2.0.pom
:farwolf:extractReleaseAnnotations FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings
137 actionable tasks: 11 executed, 126 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':farwolf:lintClassPath'.
> Could not resolve com.android.tools.lint:lint-kotlin:26.2.0.
Required by:
project :farwolf > com.android.tools.lint:lint-gradle:26.2.0 > com.android.tools.lint:lint:26.2.0
project :farwolf > com.android.tools.lint:lint-gradle:26.2.0 > com.android.tools.lint:lint:26.2.0 > com.android.tools.lint:lint-checks:26.2.0 > com.android.tools.lint:lint-api:26.2.0
> Could not resolve com.android.tools.lint:lint-kotlin:26.2.0.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/lint/lint-kotlin/26.2.0/lint-kotlin-26.2.0.jar'.
> Could not HEAD 'https://jcenter.bintray.com/com/android/tools/lint/lint-kotlin/26.2.0/lint-kotlin-26.2.0.jar'.
> Read timed out
> Could not resolve com.google.errorprone:error_prone_annotations:2.0.18.
Required by:
project :farwolf > com.android.tools.lint:lint-gradle:26.2.0 > com.android.tools.lint:lint:26.2.0 > com.google.guava:guava:23.0
> Skipped due to earlier error
* 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.
看這個提示就知道是Could not resolve com.android.tools.lint:lint-kotlin:26.2.0.
錯誤了,於是我順着這個找了半天,gradle也去逛了半天沒結果
也有朋友
說這麼幹,但是我沒還是沒整對…
最後用as將項目目錄下platforms\android下對應的項目導入(我這是portal-app\platforms\android\portal-app), 然後File>Sync Project with Gradle Files 跑maven去download 半天在那裏,最後看到了run tasks success
好了這次再回到cmd中去weexplus publish android
終於看到了久違的 BUILD SUCCESSFUL
經過上面折騰初步斷定是由於Download https://maven.google.com/com/android/tools/lint/lint-api/26.2.0/lint-api-26.2.0.pom
失敗而引起的依賴丟失,build failed
而經過多次cmd build嘗試,覺得cmd 中直接到google download 還是不如as 有威力呀,as 直接一次就download好了所有,而cmd 中總是會有超時。
ok 搞定,記錄,避免下次遇到有不知從何着手
其他請參考weexplus build官網