1

Hi, I downloaded android studio and installed it downloaded API 30.0.1

but when I press Ctrl+Q to show inline docs, android studio try to fetch it from the network online

enter image description here

enter image description here I need it to work offline, I can not find the old option in the SDK manager

Documentation for Android SDK

enter image description here

And when I try to navigate to any class or method in android API navigate to source Ctrl + L-mouse-button

android studio show me

first message

and when I press on download option in the top right corner

it shows me

enter image description here

And This is My SDK Manager

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here


The Project

And build.gradle Module


apply plugin: 'com.android.application'

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.1"

    defaultConfig {
        applicationId "com.albanna.databaseworks"
        minSdkVersion 19
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

}

build.gradle Project


// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.0.0"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

My SDK Folder

d

My Laptop Configurations

Processor   Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, 2592 Mhz, 6 Core(s), 12 Logical Processor(s)

BIOS Mode   UEFI

Installed Physical Memory (RAM) 16.0 GB, dual-channel 2666 MHz

SSD NVME M2 3200/2500 read/write MB/S


So I need it to work like IntelliJ IDE or Rider, when I press Ctrl+Q on any method, it should show the docs and I can navigate to the source Offline

Thanks.

1 Answer 1

6

I Found The Solution

This problem because Google does not provide the source code of API 30 yet, so I just go back to API 29, and everything work

from FileProject StructureModules

then change

  • Compile Sdk Version to 29
  • Build Tools Version 29.0.3

Also notice: you must have Source For Android 29 or any version you have, selected in SDK Platforms

enter image description here

I notice this problem from this thread on readit

And this says that Google will only release the source with the system, not with the API.

So I just go back to API 29

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.