如何在 Android Studio 中包含 Android N 源代码?
How do you include Android N source code inside Android Studio?
在 Android Studio 中开发时如何 include/download Android N 源代码?
documentation/source 代码目前在 Android SDK 管理器中不可用。
@路人 谢谢告知,我就这样下载了:
目前,没有可用的文档和 SDK 源代码可从 SDK 管理器下载,只有编译的 SDK 和示例(请参阅 GitHub). But you can use updated for N API Reference together with Android API Differences Report 了解代码。
更新: Google 将 Android 7.0 推送到 AOSP,因此您现在可以从 SDK Manager 下载 API 24 的源代码
要在项目中使用 N 预览版 SDK,请按如下方式更新您的 build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-N'
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.alvenir.myapplication"
minSdkVersion 'N'
targetSdkVersion 'N'
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
现在可以从 SDK 获得 Android N 的源代码。
在 Android Studio 中开发时如何 include/download Android N 源代码?
documentation/source 代码目前在 Android SDK 管理器中不可用。
@路人 谢谢告知,我就这样下载了:
目前,没有可用的文档和 SDK 源代码可从 SDK 管理器下载,只有编译的 SDK 和示例(请参阅 GitHub). But you can use updated for N API Reference together with Android API Differences Report 了解代码。
更新: Google 将 Android 7.0 推送到 AOSP,因此您现在可以从 SDK Manager 下载 API 24 的源代码
要在项目中使用 N 预览版 SDK,请按如下方式更新您的 build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-N'
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.alvenir.myapplication"
minSdkVersion 'N'
targetSdkVersion 'N'
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
现在可以从 SDK 获得 Android N 的源代码。