使用命令编译Gradle Daemon

使用Android Studio编译报如下异常

IOException: https://dl.google.com/android/repository/addons_list-3.xml
java.net.ConnectException: Connection refused: connect
IOException: https://dl.google.com/android/repository/addons_list-2.xml
java.net.ConnectException: Connection refused: connect
IOException: https://dl.google.com/android/repository/addons_list-1.xml
java.net.ConnectException: Connection refused: connect
Failed to download any source lists!
File C:\Users\Administrator\.android\repositories.cfg could not be loaded.
IO exception while downloading manifest:
java.net.ConnectException: Connection refused: connect
	at java.base/java.net.PlainSocketImpl.connect0(Native Method)
	at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:101)
	at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
	at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
	at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)


Still waiting for package manifests to be fetched remotely.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 21s

首先,使用“gradlew clean”

D:\Android\AndroidStudioProjects\GestureClassification>gradlew clean


Welcome to Gradle 6.8.3!

Here are the highlights of this release:
 - Faster Kotlin DSL script compilation
 - Vendor selection for Java toolchains
 - Convenient execution of tasks in composite builds
 - Consistent dependency resolution

For more details see https://docs.gradle.org/6.8.3/release-notes.html


------------------------------------------------------------
Gradle 6.8.3
------------------------------------------------------------

Build time:   2021-02-22 16:13:28 UTC
Revision:     9e26b4a9ebb910eaa1b8da8ff8575e514bc61c78

Kotlin:       1.4.20
Groovy:       2.5.12
Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM:          1.8.0_221 (Oracle Corporation 25.221-b11)
OS:           Windows 10 10.0 amd64

D:\Android\AndroidStudioProjects\GestureClassification>gradlew clean
Starting a Gradle Daemon, 2 incompatible and 8 stopped Daemons could not be reused, use --status for details

BUILD SUCCESSFUL in 10s
2 actionable tasks: 2 up-to-date

其次,使用“gradlew build”编译应用

D:\Android\AndroidStudioProjects\GestureClassification>gradlew build
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01

> Task :app:stripDebugDebugSymbols
WARNING: Compatible side by side NDK version was not found. Default is 21.0.6113669.
Compatible side by side NDK version was not found. Default is 21.0.6113669.
Unable to strip the following libraries, packaging them as they are: libtensorflowlite_jni.so.

> Task :app:compileDebugJavaWithJavac
ע: D:\Android\AndroidStudioProjects\GestureClassification\app\src\main\java\org\tensorflow\lite\examples\gesture\Camera2BasicFragment.javaʹû�ѹʱ API
ע: D:\Android\AndroidStudioProjects\GestureClassification\app\src\main\java\org\tensorflow\lite\examples\gesture\Camera2BasicFragment.j
avaʹû�ѹʱ API
ע: йϸϢ, ʹ -Xlint:deprecation ±롣

> Task :app:compileReleaseJavaWithJavac
ע: D:\Android\AndroidStudioProjects\GestureClassification\app\src\main\java\org\tensorflow\lite\examples\gesture\Camera2BasicFragment.j
avaʹû�ѹʱ API
ע: йϸϢ, ʹ -Xlint:deprecation ±롣

> Task :app:lint
Ran lint on variant release: 95 issues found
Ran lint on variant debug: 95 issues found
Wrote HTML report to file:///D:/Android/AndroidStudioProjects/GestureClassification/app/build/reports/lint-results.html
Wrote XML report to file:///D:/Android/AndroidStudioProjects/GestureClassification/app/build/reports/lint-results.xml

> Task :app:stripReleaseDebugSymbols
Unable to strip the following libraries, packaging them as they are: libtensorflowlite_jni.so.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 2m 1s
50 actionable tasks: 50 executed

则应用最终会编译出来。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值