1. gradle模式如何自动导入jar包,及其文档 注释
的在当前Modle的 build.gradle 下,
加上 apply plugin:'idea' 表示使用idea插件
在加上
idea{
module {
downloadJavadoc = true
downloadSources = true
}
}
2.
Android Studio 工程 无法正常使用aar的本地依赖或者是第三方库(aar格式的)
在Androi Studio中 使用纯Java工程的Module时,运行不起来,报
Could not get resource 'https://jcenter......gradle-core'
Could not get resource 'https://jcenter......gradle-core'
Could not Get 'https://jcenter.....gradle-core'
原因:可能是因为使用https的原因,
解决方案 在工程的build.gradle中
buildscript { repositories { repositories { maven { url 'http://repo1.maven.org/maven2' } } } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }
buildscript指的是gradle本生需要的脚本 依赖。 将jcenter() 改为
epositories {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
}
}
解决了上述2个问题。