Android SDK API 离线文档在 android studio 上不起作用,所有包都无法下载
Android SDK API offline documentation does not work on android studio , All Packages are not available for download
嗨,
我下载了 android studio 并安装了它下载 API 30.0.1
但是当我按 Ctrl+Q 显示内联文档时,android studio 尝试从网络获取它 online
我需要它离线工作,我在 SDK 管理器中找不到旧选项
Documentation for Android SDK
当我尝试导航到 android API navigate to source Ctrl + L-mouse-button
中的任何 class 或方法时
android 工作室给我看
当我按下下载选项时 in the top right corner
它告诉我
这是我的 SDK 管理器
项目
和build.gradleModule
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
}
我的 SDK 文件夹
我的笔记本电脑配置
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
所以我需要它像 IntelliJ IDE 或 Rider 一样工作,当我在任何方法上按 Ctrl+Q 时,它应该显示文档并且我可以导航到源 Offline
谢谢。
我找到了解决方案
这个问题是因为Google还没有提供API30的源码,所以
我刚回到API 29,一切正常
从File
→Project Structure
→Modules
然后改变
Compile Sdk Version
到 29
Build Tools Version
29.0.3
另请注意:您必须选择 Source For Android 29
或您拥有的任何版本
在 SDK Platforms
注意到这个问题
这表示 Google 只会通过系统发布源,而不是 API。
所以我回到API 29
嗨, 我下载了 android studio 并安装了它下载 API 30.0.1
但是当我按 Ctrl+Q 显示内联文档时,android studio 尝试从网络获取它 online
Documentation for Android SDK
当我尝试导航到 android API navigate to source Ctrl + L-mouse-button
android 工作室给我看
当我按下下载选项时 in the top right corner
它告诉我
这是我的 SDK 管理器
项目
和build.gradleModule
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
}
我的 SDK 文件夹
我的笔记本电脑配置
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
所以我需要它像 IntelliJ IDE 或 Rider 一样工作,当我在任何方法上按 Ctrl+Q 时,它应该显示文档并且我可以导航到源 Offline
谢谢。
我找到了解决方案
这个问题是因为Google还没有提供API30的源码,所以 我刚回到API 29,一切正常
从File
→Project Structure
→Modules
然后改变
Compile Sdk Version
到29
Build Tools Version
29.0.3
另请注意:您必须选择 Source For Android 29
或您拥有的任何版本
在 SDK Platforms
这表示 Google 只会通过系统发布源,而不是 API。
所以我回到API 29