android– 无法规范化bintrayUpload中的路径

android– 无法规范化bintrayUpload中的路径,第1张

概述运行gradlewinstall时出现以下错误.Failedtocapturesnapshotofinputfilesfortask‘javadoc’duringup-to-datecheck.Seestacktracefordetails.Couldnotnormalizepathforfile‘C:\android\sdk\platforms\android-23\android.jar;C:\android\sdk\platfor

运行gradlew install时出现以下错误.

Failed to capture snapshot of input files for task ‘javadoc’ during up-to-date check. See stacktrace for details.

Could not normalize path for file ‘C:\androID\sdk\platforms\androID-23\androID.jar;C:\androID\sdk\platforms\androID-23\optional\org.apache.http.legacy.jar’

该项目的build.gradle:

// 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:1.3.0'    classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'    classpath 'com.github.dcendents:androID-maven-gradle-plugin:1.3'    // 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}

库模块的build.gradle:

apply plugin: 'com.androID.library'apply plugin: 'com.jfrog.bintray'apply plugin: 'com.github.dcendents.androID-maven'ext {bintrayRepo = 'maven'bintrayname = 'befrest'publishedGroupID = 'com.oddrun.librarIEs'libraryname = 'Befrest'artifact = 'befrest'libraryDescription = 'Simple Push Notification library For AndroID'siteUrl = 'https://github.com/hojjat-imani/PushNotif'gitUrl = 'https://github.com/hojjat-imani/PushNotif.git'libraryVersion = '0.0.1'developerID = 'hojjat-imani'developername = 'Hojjat Imani'developerEmail = '[email protected]'licensename = 'The Apache Software license, Version 2.0'licenseUrl = 'http://www.apache.org/licenses/liCENSE-2.0.txt'alllicenses = ["Apache-2.0"]}androID {compileSdkVersion 23buildToolsversion "23.0.1"uselibrary  'org.apache.http.legacy'defaultConfig {    minSdkVersion 10    targetSdkVersion 23    versionCode 0    versionname "0.0.1"}buildTypes {    release {        MinifyEnabled false        proguardfiles getDefaultProguardfile('proguard-androID.txt'), 'proguard-rules.pro'    }}}dependencIEs {compile filetree(dir: 'libs', include: ['*.jar'])testCompile 'junit:junit:4.12'}version = libraryVersiontask sourcesJar(type: Jar) {from androID.sourceSets.main.java.srcDirsclassifIEr = 'sources'}task javadoc(type: Javadoc) {source = androID.sourceSets.main.java.srcDirsclasspath += project.files(androID.getbootclasspath().join(file.pathSeparator))}task javadocJar(type: Jar, dependsOn: javadoc) {classifIEr = 'javadoc'from javadoc.destinationDir}artifacts {archives javadocJararchives sourcesJar}// BintrayPropertIEs propertIEs = new PropertIEs()propertIEs.load(project.rootProject.file('local.propertIEs').newDatainputStream())bintray {user = propertIEs.getProperty("bintray.user")key = propertIEs.getProperty("bintray.APIkey")configurations = ['archives']pkg {    repo = bintrayRepo    name = bintrayname    desc = libraryDescription    websiteUrl = siteUrl    vcsUrl = gitUrl    licenses = alllicenses    publish = true    publicDownloadNumbers = true    version {        desc = libraryDescription        gpg {            sign = true //Determines whether to GPG sign the files. The default is false            passphrase = propertIEs.getProperty("bintray.gpg.password")            //Optional. The passphrase for GPG signing'        }    }}}group = publishedGroupID                               // Maven Group ID for the artifactinstall {repositorIEs.mavenInstaller {    // This generates POM.xml with proper parameters    pom {        project {            packaging 'aar'            groupID publishedGroupID            artifactID artifact            // Add your description here            name libraryname            description libraryDescription            url siteUrl            // Set your license            licenses {                license {                    name licensename                    url licenseUrl                }            }            developers {                developer {                    ID developerID                    name developername                    email developerEmail                }            }            scm {                connection gitUrl                developerConnection gitUrl                url siteUrl            }        }    }}}

解决方法:

您可以在libs文件夹中添加org.apache.http.legacy.jar.
你可以在AndroID / Sdk / platforms / androID-23 / optional中找到这个jar

我还将此行添加到了我的app.gradle文件中

compile files('libs/org.apache.http.legacy.jar')

但是如果你使用更多的库,你可以使用这种方式

compile filetree(dir: 'libs', include: ['*.jar'])

这解决了我因谷歌删除了对Apache http客户端的支持而导致的所有错误.不要将compileSdkVersion 23更改为22,我认为这个解决方案更好.

总结

以上是内存溢出为你收集整理的android – 无法规范化bintrayUpload中的路径全部内容,希望文章能够帮你解决android – 无法规范化bintrayUpload中的路径所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1108065.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存