我试图建立一个maven库,基本上我创建了一个新项目并将相关文件包装为一个模块,但是当我试图调用命令时
gradlew install
我不断收到此错误:
似乎由于某种原因在创建 javadoc 时出现了一些错误,我已经对文档进行了三次检查并从中删除了任何特殊属性,此时它实际上只是一个纯文本,所以我有理由相信它与另一个有关我在输出中看到的错误说包 R 不存在。
我正在使用基于此页面中的指南的 Java 1.8:http://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en
我不知道我在这里做错了什么。这整个过程有些随机。
这是我模块的 gradle.build 文件:
apply plugin: 'com.android.library'
ext {
bintrayRepo = 'maven'
bintrayName = 'designtoolbox-styleable-dialog'
publishedGroupId = 'com.lirancohen.designtoolbox'
libraryName = 'designtoolbox-styleable-dialog'
artifact = 'designtoolbox-styleable-dialog'
libraryDescription = 'A fully customize-able dialog for android'
siteUrl = 'https://cohen_liran@bitbucket.org/cohen_liran/design-toolbox'
gitUrl = 'https://cohen_liran@bitbucket.org/cohen_liran/design-toolbox.git'
libraryVersion = '0.0.1'
developerId = 'lirancr'
developerName = '[MY NAME]'
developerEmail = '[MY EMAIL]'
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
}
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
在尝试了几个小时自己解决这个问题后,我想我会在这里弹出这个,如果我最终自己排序,我也会更新
最佳答案
回答我自己的问题,最后我删除了引发错误的最终引用,我认为它与 R 包有关的东西应该保持动态,因此不能在外部库中声明为 final
关于android - gradlew 安装包 R 不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35651122/