Currently it's not very intuitive how to switch between Android SDK source files in Android Studio while, for example, debugging or just inspecting the sources.
I've got the feeling that Android Studio, unlike IntelliJ, is getting the source's version from the compiled SDK version section of the Gradle configuration. But, this is forcing me to debug on a device which is using the same Android version when debugging. If I don't, then the sources won't be in sync with the debugger.
My question: Is there an easy way to switch between Android sources in Android Studio without having to change the configuration in build.gradle
?
Step 1: Open your project in Android mode then go to Gradle Scripts > build. gradle(Module: app) as shown in the following image. Step 2: Refer to the below image and here you have to change the minSdkVersion and targetSdkVersion as per the requirement.
Try this:
mv $ANDROID_HOME/sources/android-21 $ANDROID_HOME/sources/android-21-orig
cp $ANDROID_HOME/sources/android-17 $ANDROID_HOME/sources/android-21
NodeJS program to easily switch the Android SDK Sources which Android Studio attaches when debugging.
Try this:
mv $ANDROID_HOME/sources/android-21 $ANDROID_HOME/sources/android-21-orig
cp $ANDROID_HOME/sources/android-17 $ANDROID_HOME/sources/android-21
NodeJS program to easily switch the Android SDK Sources which Android Studio attaches when debugging.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With