gradlew安装包R不存在

时间:2016-02-26 11:58:35

标签: android maven gradle

我正在尝试构建一个maven库,基本上我创建了一个新项目并将相关文件包装为模块,但是当我试图调用命令时

 gradlew install

我一直收到这个错误: enter image description here

似乎因为某些原因创建了一个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'

经过几个小时的努力自己解决这个问题后,我想我会在这里弹出这个,如果我自己最终对此进行排序,我也会更新

1 个答案:

答案 0 :(得分:0)

回答我自己的问题,最后我去除了抛出错误的最终引用,我认为它与R包的关系应该保持动态,所以它不能在外部库中声明为final

相关问题