在 UE5 上构建 Android 时出现错误。
LogPlayLevel: Daemon will be stopped at the end of the build stopping after processing
LogPlayLevel: Build-tool 31.0.0 is missing DX at D:\androidSDk\build-tools\31.0.0\dx.bat
LogPlayLevel: IOException: https://dl.google.com/android/repository/addons_list-3.xml
LogPlayLevel: java.net.ConnectException: Connection refused: connect
LogPlayLevel: IOException: https://dl.google.com/android/repository/addons_list-2.xml
LogPlayLevel: java.net.ConnectException: Connection refused: connect
LogPlayLevel: IOException: https://dl.google.com/android/repository/addons_list-1.xml
LogPlayLevel: java.net.ConnectException: Connection refused: connect
LogPlayLevel: Failed to download any source lists!
LogPlayLevel: IO exception while downloading manifest:
LogPlayLevel: java.net.ConnectException: Connection refused: connect
LogPlayLevel: at java.net.DualStackPlainSocketImpl.connect0(Native Method)
LogPlayLevel: at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
LogPlayLevel: at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
LogPlayLevel: at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
LogPlayLevel: at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
LogPlayLevel: at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
LogPlayLevel: at java.net.Socket.connect(Socket.java:589)
LogPlayLevel: at java.net.Socket.connect(Socket.java:538)
LogPlayLevel: at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
LogPlayLevel: at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
LogPlayLevel: at sun.net.www.http.HttpClient$1.run(HttpClient.java:515)
LogPlayLevel: at sun.net.www.http.HttpClient$1.run(HttpClient.java:513)
LogPlayLevel: at java.security.AccessController.doPrivileged(Native Method)
LogPlayLevel: at sun.net.www.http.HttpClient.privilegedOpenServer(HttpClient.java:512)
LogPlayLevel: at sun.net.www.http.HttpClient.openServer(HttpClient.java:553)
LogPlayLevel: at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
LogPlayLevel: at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
LogPlayLevel: at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
LogPlayLevel: at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1199)
LogPlayLevel: at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
LogPlayLevel: at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
LogPlayLevel: at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:162)
LogPlayLevel: at com.android.sdklib.repository.legacy.remote.internal.DownloadCache.openUrl(DownloadCache.java:247)
LogPlayLevel: at com.android.sdklib.repository.legacy.remote.internal.DownloadCache.downloadAndCache(DownloadCache.java:624)
LogPlayLevel: at com.android.sdklib.repository.legacy.remote.internal.DownloadCache.openCachedUrl(DownloadCache.java:455)
LogPlayLevel: at com.android.sdklib.repository.legacy.LegacyDownloader.downloadAndStream(LegacyDownloader.java:61)
LogPlayLevel: at com.android.repository.impl.downloader.LocalFileAwareDownloader.downloadAndStream(LocalFileAwareDownloader.java:51)
LogPlayLevel: at com.android.repository.impl.manager.RemoteRepoLoaderImpl.lambda$fetchPackages$0(RemoteRepoLoaderImpl.java:139)
LogPlayLevel: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
LogPlayLevel: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
LogPlayLevel: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
LogPlayLevel: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
LogPlayLevel: at java.lang.Thread.run(Thread.java:748)
LogPlayLevel: Still waiting for package manifests to be fetched remotely.
LogPlayLevel: FAILURE: Build failed with an exception.
LogPlayLevel: * What went wrong:
LogPlayLevel: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
LogPlayLevel: > Failed to find Build Tools revision 31.0.0
LogPlayLevel: * Try:
LogPlayLevel: 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.
LogPlayLevel: * Get more help at https://help.gradle.org
LogPlayLevel: BUILD FAILED in 15s
我知道Failed to download any source lists
错误是因为我无法连接到谷歌。所以,我找到了一个连接到谷歌的代理。
我正在尝试编辑Engine\Extras\Android\SetupAndroid.bat
以确保它将使用代理,并且我成功了,并且我使用 curl 命令获取 XML 文件,它也成功了。
但是现在在虚幻引擎cmd上不能用了,还是Failed to download any source lists
报错。
我在 UEProject 中找到了 Gradle 文件,我尝试对其进行编辑,但是当我为我的 Android 设备重建项目时,它会刷新。
所以我被卡住了,我想我应该找到一种在虚幻引擎上使用代理的方法?