Reputation: 19381
in Android Studio (2.2 Preview 2), I have the sdk sources attached and I can also jump to the interfaces of android sources: e.g. when I CTRL-click on SharedPreferences
, the file ~/Android/Sdk/sources/android-23/android/content/SharedPreferences.java
is opened.
But now I also want to jump to the implementation of this interface - or a member function e.g. getFloat()
How can this be done?
notes:
no implementations found
SharedPreferencesImpl.java
exists in the location where I expect it: ~/Android/Sdk/sources/android-23/android/app
compileSdkVersion
is set to 23 in my build.gradle
fileUpvotes: 1
Views: 2015
Reputation: 19381
I found a workaround to easily get me to the implementation file:
SharedPreferences
Find Usages
dialogue (e.g. press CTRLALTSHIFT7). In the Scope
box select Project and Libraries
.Find
button and the SharedPreferencesImpl class will show up in Found usages
(under the Android API 23 Platform node)Upvotes: 0
Reputation: 4451
Maybe I found the solution. The implementation class signature looks the following:
final class SharedPreferencesImpl implements SharedPreferences {
This is the default access modifier and means that it is only visible in the current package android.app. But your interface is defined in another package android.content thats why Android Studio cannot find the implementation.
But even If you click through your "External Libraries" in Android Studio of your project you cannot see the android.app.SharedPreferencesImpl class ...
Upvotes: 1