Android Studio does not redirect me to API sources correctly. When I hit any function, it decompiles the bytecode of the .class file instead of accessing the correct file from the sdk / sources tree.
Pressing the βdownloadβ and βupdateβ options does nothing. This is especially annoying for the implementation of listeners, since it generates function headers without green variables from the documentation (i.e. Var1, var2, etc.). I set the compression and target SDK to 23. I tried reinstalling the SDK tools, updating the AS from the channel channel, invalidating the cache, but nothing helped so far. I switched to API 21 and it works great. What am I missing?
EDIT I installed API 23 (SDK platform, tools, documents, sources), so please just leave a comment if you want to downgrade.
EDIT My build.gradle:
apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion '23.0.2' defaultConfig { applicationId "com.myapp.app" minSdkVersion 10 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.3.0' compile 'com.android.support:design:23.3.0' compile 'com.squareup.picasso:picasso:2.5.2' compile project(':volley') compile 'com.jakewharton:butterknife:7.0.1' }
Below you can find gradle output for an empty project (without third-party libraries) with the same set of API 23 and the same behavior.
Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies] Configuration on demand is an incubating feature. Incremental java compilation is an incubating feature. :clean :app:clean :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAnimatedVectorDrawable2330Library :app:prepareComAndroidSupportAppcompatV72330Library :app:prepareComAndroidSupportDesign2330Library :app:prepareComAndroidSupportRecyclerviewV72330Library :app:prepareComAndroidSupportSupportV42330Library :app:prepareComAndroidSupportSupportVectorDrawable2330Library :app:prepareDebugDependencies :app:compileDebugAidl :app:compileDebugRenderscript :app:generateDebugBuildConfig :app:mergeDebugShaders :app:compileDebugShaders :app:generateDebugAssets :app:mergeDebugAssets :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources :app:mergeDebugResources :app:processDebugManifest :app:processDebugResources :app:generateDebugSources :app:preDebugAndroidTestBuild UP-TO-DATE :app:prepareDebugAndroidTestDependencies :app:compileDebugAndroidTestAidl :app:processDebugAndroidTestManifest :app:compileDebugAndroidTestRenderscript :app:generateDebugAndroidTestBuildConfig :app:mergeDebugAndroidTestShaders :app:compileDebugAndroidTestShaders :app:generateDebugAndroidTestAssets :app:mergeDebugAndroidTestAssets :app:generateDebugAndroidTestResValues UP-TO-DATE :app:generateDebugAndroidTestResources :app:mergeDebugAndroidTestResources :app:processDebugAndroidTestResources :app:generateDebugAndroidTestSources :app:mockableAndroidJar :app:preDebugUnitTestBuild UP-TO-DATE :app:prepareDebugUnitTestDependencies BUILD SUCCESSFUL
android-studio android-api-levels
Luke Apr 23 '16 at 18:25 2016-04-23 18:25
source share