How to pass a parameter to the Java code in run/debug configuration from Android Studio

后端 未结 4 2044
北海茫月
北海茫月 2021-02-04 12:47

My android app does some http requests to my server. However sometimes I am debugging the new api code that runs on my development machine. I would like to be able to pass somet

4条回答
  •  醉酒成梦
    2021-02-04 12:50

    Due to a bug in Android Studio, you cannot pass vm or script parameters from a gradle configuration. The issue is here.

    As a workaround in Linux envs (probably Mac too), you can create a bash configuration where you will be able to add all desired parameters.

提交回复
热议问题