Android的工作室:如何看支持Android V4和V7来源是什么? [英] Android Studio: How to see sources for android support v4 and v7?
问题描述
在Android Studio中支持库程序兼容性
(对于动作条)定义为摇篮依赖。
In Android Studio support library appcompat
(for ActionBar) is defined as Gradle dependency.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
}
解析得到V4为好。
That resolves to get v4 as well.
点击进入到类时怎么看源?
How to see source when clicking to into classes?
例如。 android.support.v4.widget.DrawerLayout
目前Android Studio中说
Currently Android Studio says
//的IntelliJ API闪客存根类文件中的结果生成的源
//方法实现不可
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
有关ADT是<一个href=\"http://stackoverflow.com/questions/18298638/how-to-add-source-javadoc-for-android-support-v7\">How添加源+ javadoc了解Android的支持-V7?
推荐答案
由保罗Verest完成上述研究之后...
Following from the above research done by Paul Verest...
IDE:Android的工作室1.3.2
IDE: Android studio 1.3.2
这是一个2步:考虑这个样本的build.gradle
It is a 2-step process: Consider this sample build.gradle
1)添加以下到您的build.gradle(模块:应用程序) - 搜索2 //添加下面的评论
1) Add the following to your build.gradle (Module:app) - search the 2 //Add comments below.
apply plugin: 'com.android.application'
apply plugin: 'idea' //Add
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.mycompany.android.myapp"
minSdkVersion 16
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.0'
}
//Add
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
2)重建项目。
2) Rebuild project.
在这一点上,如果你想看到Android Studio中源,这将拉动源*的.java而不是反编译的* .class
After this point if you want to see source in Android Studio, it will pull up the source *.java instead of decompiled *.class
这篇关于Android的工作室:如何看支持Android V4和V7来源是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!