JakeWharton / SdkSearch

An Android app and Chrome extension for searching the Android SDK documentation.
Apache License 2.0
2.06k stars 176 forks source link

Failed to update class list on Android Device #191

Open shipsywor opened 3 years ago

shipsywor commented 3 years ago

Cloned repo. Added CI token. Built the project in Android Studio. Ran it on Emulator and Device as well, the snackbar displays "Failed to update class list on Android Device"

Why is it not working as intended even after a successful build?

JakeWharton commented 3 years ago

Google broke the upstream source of data a year ago or so. I just haven't had the time or desire to try and figure out how to fix it.

shipsywor commented 3 years ago

Okay! Looking forward to seeing if you get time in the future or some contributor. Thanks!

wuairc commented 1 year ago

Class list can be obtained by scanning android.jar(should be easier) or android-stubs-src.jar in the Android SDK directory (~/Library/Android/sdk/platforms/android-33/) , these two files can be downloaded on the fly if the url can be obtained and we know the latest api level. We can also just embed the class list in the project.

wuairc commented 1 year ago
  1. Android SDK file list can be found in https://dl.google.com/android/repository/repository2-2.xml, latest one is platform-33_r02.zip
  2. download the zip from https://dl.google.com/android/repository/platform-33_r02.zip (67.3MB in size)
  3. extract android.jar from downloaded platform-33_r02.zip we can get the class list