AndroidStudio技巧-发布library到jitpack并带注释

在project的build.gralde中添加classpath

1
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'

注意:如果没有加google(),必须加上这个,并且buildscript和allprojects都得加上。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}

AndroidStudio技巧-mac上导入导出SVN项目

Android Studio -> SVN

  • 1.打开项目
  • 2.Preferences -> Version Control -> Ignored Files
    (1)app/build
    (2)build
    (3)*.iml
  • 3.VCS -> import into version control -> import into subversion
  • 4.Submit

SVN -> Android Studio

  • 1.Check out project from version control
  • 2.选择Subversion
  • 3.选中项目文件夹根目录
  • 4.选择保存路径(非中文路径,新建一个项目文件夹)
  • 5.等待完成(如果打开会报错,大多是找不到gradle,别急)。
  • 6.复制其他项目的local.properties文件到项目文件夹。
  • 7.open a new Android Studio project打开项目