Status Update
Comments
ro...@gmail.com <ro...@gmail.com> #2
FYI. Here is a very hacky workaround.
I use appcompat support library quite a lot. Changing the compileSdkVersion only results in massive compile errors. If you are using appcompat-21, you must compile against api 21 or you will get compile errors.
This works fine if you are debugging against version 21. But when you are debugging on Jelly Bean (API 17), your debugger keeps dropping you to the API 21 source. Very annoying and hard to debug.
The solution I've ended up using is very hacky but works! Let's say you are trying to debug against API 17. Do the following:
1. mv $ANDROID_HOME/sources/android-21 $ANDROID_HOME/sources/android-21-orig
2. cp $ANDROID_HOME/sources/android-17 $ANDROID_HOME/sources/android-21
3. restart android studio so it will pick up the correct paths.
4. Debug
Just don't forget to put all the directories back after you're done.
I use appcompat support library quite a lot. Changing the compileSdkVersion only results in massive compile errors. If you are using appcompat-21, you must compile against api 21 or you will get compile errors.
This works fine if you are debugging against version 21. But when you are debugging on Jelly Bean (API 17), your debugger keeps dropping you to the API 21 source. Very annoying and hard to debug.
The solution I've ended up using is very hacky but works! Let's say you are trying to debug against API 17. Do the following:
1. mv $ANDROID_HOME/sources/android-21 $ANDROID_HOME/sources/android-21-orig
2. cp $ANDROID_HOME/sources/android-17 $ANDROID_HOME/sources/android-21
3. restart android studio so it will pick up the correct paths.
4. Debug
Just don't forget to put all the directories back after you're done.
sa...@gmail.com <sa...@gmail.com> #4
I'm finding that android studio uses the first platform it finds. I have several modules which have different compileSDK versions. So even if my app is set to compileSDK 22 and my device is running 22 i will still be dropped into API 15 source, as one of my modules is compiled with API 15 and ti seems to find this one first...
vi...@hradecky.net <vi...@hradecky.net> #5
A year later and no solution?
[Deleted User] <[Deleted User]> #6
Two years later, still no solution ?
I could be OK with that if all API was backward compatible, but it's not. So we definitely need to know which code is executed to understand what we are doing "wrong".
I could be OK with that if all API was backward compatible, but it's not. So we definitely need to know which code is executed to understand what we are doing "wrong".
vs...@google.com <vs...@google.com> #7
This was fixed a long time ago. If it doesn't work for you, please file a bug and include what version you deployed to and the idea.log file (Help | Show Log in Files)
pa...@gmail.com <pa...@gmail.com> #8
It doesn't work. AndroidStudio 2.3.3
ta...@gmail.com <ta...@gmail.com> #9
Not Fixed in Android Studio 3.0.1
pl...@gmail.com <pl...@gmail.com> #10
Not Fixed in Android Studio 3.0.1 yet
[Deleted User] <[Deleted User]> #11
Not fixed in AS 3.2.1. What's going on guys? This is unacceptable.
mo...@gmail.com <mo...@gmail.com> #12
Hey payclip, if you include your idea.log, they may fix it sooner!
we...@gmail.com <we...@gmail.com> #13
Not Fixed in Android Studio 3.5.1
ch...@bytedance.com <ch...@bytedance.com> #14
Not Fixed in Android Studio 4.0.1, either.
[Deleted User] <[Deleted User]> #15
Still not working in Android 4.2.2. How so? That's a shame
Description
1.6.0_65-b14-468-11M4828ax64 Apple Inc., Mac OS X(x86_64) v10.10.4 unknown (1440x900, 1920x1080 R)
IMPORTANT: Please read
When debugging an app, the android source that is used should be the version of the device or emulator that is running. Instead, the android source from compileSdkVersion is used. This makes it next to impossible to successfully debug apps that use libraries like appcompat on older versions of android.