Android快速发布项目到jcenter详解
不管别人的教程多详细,都有他们忽略的坑,所以,都要自己动手。我也是参考了许多许多的博客,弄了一上午加下午十分钟,才搞定。
参考:
下面这个是大部分的步骤
http://blog.csdn.net/zhcswlp0625/article/details/54895584
下面这个是填坑的:
http://blog.csdn.net/tmac2000/article/details/53261141
坑一:
创建仓库时,如果使用Bintray-release,名字就填成maven,因为他的wiki:repoName: The repository name. Set to ‘maven’ by default.(有错误请指出)
不然就会报错:
Bintray- HTTP/1.1 404 Not Found [message:Repo ‘maven’ was not found]
坑二:gradle版本号要写为:
classpath ‘com.android.tools.build:gradle:2.1.0’
因为
classpath ‘com.android.tools.build:gradle:2.2.0’
好像会报unsupport * 错误
我自己的一些配置:
最外层的grale配置:
// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {repositories {jcenter()}dependencies {classpath 'com.android.tools.build:gradle:2.1.0'classpath 'com.novoda:bintray-release:0.3.4'// NOTE: Do not place your application dependencies here; they belong// in the individual module build.gradle files}
}allprojects {repositories {jcenter()}
}task clean(type: Delete) {delete rootProject.buildDir
}
要上传的gradle配置:
apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release'//添加
android {compileSdkVersion 23buildToolsVersion '23.0.0'defaultConfig {minSdkVersion 15targetSdkVersion 23versionCode 1versionName "1.0"testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"}buildTypes {release {minifyEnabled falseproguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'}}lintOptions {abortOnError false}}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:25.0.0'testCompile 'junit:junit:4.12'
}publish {userOrg = 'coaxinyu'//bintray.com用户名groupId = 'com.caoxinyu'//jcenter上的路径artifactId = 'coaxinyu'//项目名称publishVersion = '1.0.0'//版本号desc = 'this is for test'//描述,不重要website = 'https://github.com/coaxinyu/tobebetter'//网站,最好有,不重要
}
然后执行的命令:
gradlew clean build bintrayUpload -PbintrayUser=coaxinyu -PbintrayKey=***** -PdryRun=false
记住,学东西都要自己动手,别人的教程再详细,在你的电脑上都会有坑。记住了,年轻人,自己动手。
Android快速发布项目到jcenter详解相关推荐
- Android快速开发之appBase——(4).详解com.snicesoft.Application和BaseActivity
转载请注明本文出自JFlex的博客http://blog.csdn.net/jflex/article/details/46441571,请尊重他人的辛勤劳动成果,谢谢! Android快速开发之ap ...
- android idata 模式,Android快速开发之appBase——(3).详解IHolder和IData
Android快速开发之appBase--(3).详解IHolder和IData IHolder和IData是AVLib的两个组件,在前面已经使用过了,那么这一篇将会详细说明这两个组件的用法. IHo ...
- android studio 库项目,Android Studio 发布项目到jcenter库
第一次发布项目到jcenter,虽然网上有很多教程了,但是过程还是比较曲折.不过最终还是找到简单的方式,使用com.novoda.bintray-release实现发布. 认识jcenter 我们经常 ...
- Android Studio发布项目到jcenter
目录 一.创建Bintray账户及Maven仓库 二.上传项目到jcenter 1.配置Android项目 2.Gradle命令上传 3.在项目中引用 4.Add to JCenter 三.Demo示 ...
- android 项目部署,Android发布项目到JCenter
JCenter是什么 大家应该都用过各种各样的Github上的第三方开源组件.类似这种效果的 compile 'wang.yuchao.demoforjcenterlibrary:DemoForJCe ...
- 深入理解Android(一):Gradle详解
http://www.infoq.com/cn/articles/android-in-depth-gradle/ http://www.infoq.com/cn/articles/android-i ...
- Android 4.1-Jelly Bean新特性详解
Android 4.1Jelly Bean新特性详解 发布会已经结束,Android新一代的4.1版本,代号Jelly Bean(果冻豆)的新系统已经正式问世,除了新架构.全新通知栏和搜索功能之外,实 ...
- Android 急速发布项目到 JitPack
转载请标明出处: http://www.cnblogs.com/zhaoyanjun/p/5942616.html 出自[赵彦军博客] 2016/10/09 前言:以前写过一篇 Android stu ...
- Android四大组件Service之AIDL详解
Android四大组件Service之AIDL详解 前言 简介 基础知识 AIDL 服务端 定义AIDL文件规则 创建 .aidl 文件 清单注册 通过 IPC 传递对象 调用 IPC 方法 Andr ...
最新文章
- 天马行空脚踏实地,阿里巴巴有群百里挑一的天才应届生
- Linux 如何获取PAGE size的大小?
- 【Todo】Tomcat与Jetty的比较 以及Tomcat架构的学习
- 设计模式之_Iterator_06
- endp 汇编start_飞思卡尔Kinetis L 汇编语言启动文件startup_MK25Z4简单分析
- mysql union left join_Case:MySQL使用left join的时候or改写成union可以提高效率
- 证明task线程是来源于线程池的,线程重用
- 论文翻译:《Improved Neural Relation Detection for Knowledge Base Question Answering》
- 百度推出开发者搜索 Beta;雷军手机使用时长曝光;苹果败诉,电脑上可以模拟 iOS 系统 | 极客头条...
- Ubuntu之安装摄像头软件GTK_UVC_Viewer
- getaway网关转发去前缀_蚂蚁金服 Service Mesh 大规模落地系列 - 网关篇
- 删除数组中重复的数字
- 为了寻找当下最好的照片备份方式,我写了7000字的长文...
- 完全小白级DataX安装配置过程详解
- cesium添加动态扩散圆,动态圆环
- Heaps | 优先队列
- 联想拯救者Legion Y7000P 2020款安装ubuntu16.04 解决WIFI 显卡 cuda10.2)
- Verilog HDL实战操作①——基本门电路
- java 获取ipv4的地址_java 获取ip地址和网络接口
- 【微信小程序】微信小程序函数封装
热门文章
- angular 打印 lodop 引入css样式
- opencv_contrib编译失败解决方法
- C语言编程中的“堆”和“栈”七大不同之处
- mySql比较并获取当前时间x分钟之前的数据(时间是字符串类型)
- VIM打开shell脚本中文乱码解决
- UVA 10603 Fill
- linux命令学习之 cp(命令学习之四)
- 看到OSC有一期是:“OSChina 第 37 期高手问答 —— 消息队列服务”
- 很近没读书了,读书笔记之大道至简
- 复地集团的现代化办公方案