Recently, I happened to be fully equipped, ready to follow my heart and try UE to develop VR programs, but I got stuck in the environment at first. After all, UE is not Android Studio, although UE is useful to build tools, but there are many pit calls. Failed to download any source lists.

Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-3.xml
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-2.xml
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-1.xml
Warning: Failed to download any source lists!
Copy the code

Began to hit the pit

Android makers all know that this problem is caused by the wall and can not connect to Google. It is easy to solve in Android Studio, and it is finished by hanging an agent. However, when running in UE, how to solve it is very difficult. So let’s try to connect the proxy in its command line. During this period, we changed many clients. Some people said that ssTap was restricted from the network card level, and the command line could be directly turned out through VPN, but after trying it, we found that it did not work.

It is said on the Internet that we need to run the tool setupAndroid. bat provided by UE before linking. In fact, I had a problem when running this tool, that is, I could not connect to my agent when running command line.

Generally speaking, VPN is set up on the computer proxy interception request to achieve traffic forwarding, in the network connection out of the local proxy node.

Put this thing on the command line

Set https_proxy 127.0.0.1:1081 set http_proxy 127.0.0.1:1081 curl https://dl.google.com/android/repository/addons_list-3.xmlCopy the code

Tests can be requested to an XML file

Good idea, bad result

It’s probably because I’m executing on this command line, and this guy secretly sends me another command line request, so I can just set proxy in the environment variable.

Say the result directly, useless !!!!

Problem solving

The average person is pushed nasty, will change your code directly, true is forced nasty.

Open the bat file and edit it directly.

Its original execution code looks like this, about 96 lines

call "%SDKMANAGER%" "platform-tools" "platforms; %PLATFORMS_VERSION%" "build-tools; %BUILDTOOLS_VERSION%" "cmake; %CMAKE_VERSION%" "ndk; %NDK_VERSION%"Copy the code

I thought you couldn’t get an agent, so I’ll just let you do it with an agent

call "%SDKMANAGER%" "platform-tools" "platforms; %PLATFORMS_VERSION%" "build-tools; %BUILDTOOLS_VERSION%" "cmake; %CMAKE_VERSION%" "ndk; "--no_https --proxy= HTTP --proxy_host=127.0.0.1 --proxy_port=1081Copy the code

Execute bat. There you go

So I am full of joy to open UE, connect my quest ready to ride the battlefield, and then……

It’s solved. It’s not solved at all. Okay, I’m gonna go back to the implementation code of this thing.

Do you guys have any good ideas? I’m so bad.