I am asking this to confirm my understanding about the use of compileSdkVersion in android.
Android sdk provides the implementation for each version under the path (Your sdk root)/Sdk/platforms/android-(sdk version) .So if you set the compileSdkVersion to say 20 and if you add a class extending Activity in your code , after building apk the apk will be packaged using Activity.class implementation taken from (Your sdk root)/Sdk/platforms/android-20/andriod.jar.
So suppose google adds a method say 'public void f1()' in the Activity implementation in android-22/android.jar and I compile my code with compileSdkVersion 22 and I am calling the method f1() from my code and I am going to run the app in a device with android version 20.
Question 1 : If the method f1() is a java layer method and not something which calls C/C++ implementations , will it run properly in the device?
When I opened the View.class file in my android studio with compileSdkVersion set as 23, I could see in the import list an item 'android.widget.ScrollBarDrawable'.But when I went inside (Your sdk root)/Sdk/platforms/android-23/android.jar I could never find the class 'ScrollBarDrawable' inside widget folder(and I came across many such implementations which are not present in android sdk like this)
Question 2 : So when apk is packaged from where does the apk builder get the implementation android.widget.ScrollBarDrawable.class?
Sorry for my bad english :(