Android Studio Kotlin gradle proxy doesn't work on physical device

56 Views Asked by At

So I need to run my app behind a proxy, I do set up one using Squid and it works great, I did check the proxy both from pc and my phone, no problem. My gradle proxy setting looks like this:

  • This is gradle.properties(Project Properties):
systemProp.http.proxyHost=x.x.x.x
systemProp.http.proxyPort=3128
systemProp.https.proxyHost=x.x.x.x
systemProp.https.proxyPort=3128
  • This is gradle.properties(Global Properties):
systemProp.http.proxyHost=x.x.x.x
systemProp.http.proxyPort=3128
systemProp.https.proxyHost=x.x.x.x
systemProp.https.proxyPort=3128
  • I also tried to put proxy on File>Appearance & Behavior>System Settings>HPPT Proxy HPPT Proxy

The weird thing is my app works just fine on Android Studio Emulator but when I try to debug on a physical device, proxy doesn't work, app can still run if I connect to company network. I have try on different devices, same thing happens.

I'm using Android Studio Giraffe | 2022.3.1 Patch 2 with gradle 8.2

0

There are 0 best solutions below