as 模块 使用 android stdio modules
1.在gradle 中添加 变量
# Project-wide Gradle settings. # IDE (e.g. Android Studio) users: # Gradle settings configured through the IDE *will override* # any settings specified in this file. # For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true # org.gradle.parallel=true COMPILE_SDK_VERSION=24 BUILD_TOOLS_VERSION=24.0.3 JUNIT_VERSION=4.12 SUPPORT_VERSION=24.2.1 #verticalrefreshlayout LIB_MINI_SDK_VERSION=16 LIB_TARGET_SDK_VERSION=24 #sample SAMPLE_MIN_SDK_VERSION=16 SAMPLE_TARGET_SDK_VERSION=23
2.修改app 中 引用
apply plugin: 'com.android.application'
android {
compileSdkVersion Integer.parseInt(COMPILE_SDK_VERSION)
buildToolsVersion BUILD_TOOLS_VERSION
defaultConfig {
applicationId "cn.baoyou.curiousby.com.newrproject"
minSdkVersion SAMPLE_MIN_SDK_VERSION
targetSdkVersion SAMPLE_TARGET_SDK_VERSION
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile "com.android.support:appcompat-v7:$SUPPORT_VERSION"
compile "com.android.support:recyclerview-v7:$SUPPORT_VERSION"
compile "com.android.support:design:$SUPPORT_VERSION"
compile 'com.tomergoldst.android:tooltips:1.0.6'
compile 'q.rorbin:badgeview:1.0.5'
compile 'com.muddzdev:styleabletoast:1.0.5'
compile 'com.wang.avi:library:2.1.3'
testCompile "junit:junit:$JUNIT_VERSION"
compile project(":verticalrefreshlayout")
compile project(":xrecyclerview")
}
3. 选择 file -> new -> import module

3. 下载 github 上一些开源 module 引入
本文 是引用 github xrecyclerview 链接https://github.com/curoiusby/XRecyclerView

4. 修改开源 module 中 配置

5. snyc now

6.test

补充内容:
as 快捷键
| 注释代码(//) | Cmd + / | Ctrl + / |
| 注释代码(/**/) | Cmd + Option + / | Ctrl + Shift + / |
| 格式化代码 | Cmd + Option + L | Ctrl + Alt + L |
| 清除无效包引用 | Option + Control + O | Alt + Ctrl + O |
| 查找 | Cmd + F | Ctrl + F |
| 查找+替换 | Cmd + R | Ctrl + R |
| 上下移动代码 | Option + Shift + Up/Down | Alt + Shift + Up/Down |
| 删除行 | Cmd + Delete | Ctrl + Y |
| 扩大缩小选中范围 | Option + Up/Down | Ctrl + W/Ctrl + Shift + W |
| 快捷生成结构体 | Cmd + Option + T | Ctrl + Alt + T |
| 快捷覆写方法 | Cmd + O | Ctrl + O |
| 快捷定位到行首/尾 | Cmd + Left/Right | Ctrl + Left/Right |
| 折叠展开代码块 | Cmd + Plus,Minus | Ctrl + Plus/Minus |
| 折叠展开全部代码块 | Cmd + Shift + Plus,Minus | Ctrl + Shift + Plus,Minus |
| 文件方法结构 | Cmd + F12 | Ctrl + F12 |
| 查找调用的位置 | Ctrl + Option + H | Ctrl + Alt + H |
| 大小写转换 | Cmd + Shift + U | Ctrl + Shift + U |
捐助开发者
在兴趣的驱动下,写一个免费的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(支持支付宝和微信捐助,加入it技术扣扣群),没钱捧个人场,谢谢各位。



谢谢您的赞助,我会做的更好!