从jcenter使用最新版本的库时,Classes.jar文件夹为空

时间:2018-02-09 13:30:35

标签: android gradle bintray jcenter

我已经通过Bintray上的android studio终端成功上传了android库,并且库也被添加到JCenter中。现在,我在gradle文件中使用了gradle依赖代码片段。它已成功同步版本" 1.0.0"。

接下来,我将库版本从1.0.0更新到1.0.1并将该库上传到Bintray。它已成功上传。另外,我在gradle文件中使用了gradle依赖代码片段。它也成功完成了1.0.1版的同步。

但我无法访问库类和函数。因为类或java文件不存在于项目外部库的classes.jar文件夹中。 (clasess.jar文件夹为空。)

非常感谢帮助!

模块的.gradle文件在这里,

net = slim.conv2d(inputs, num_outputs, 3, stride=stride, padding='SAME')

我的项目的.gradle文件是,

 apply plugin: 'com.android.library'

ext {
    bintrayRepo = 'WebViewOverlayvcx'
    bintrayName = 'WebViewOverlayvcx'

    publishedGroupId = 'org.sumitdemo'
    libraryName = 'WebViewOverlayvcx'
    artifact = 'WebViewOverlayVCX'

    libraryDescription = 'A widget to load WebView as an Overlay.'

    siteUrl = 'https://github.com/sumitdemo/mylibDemo'
    gitUrl = 'https://github.com/sumitdemo/mylibDemo.git'

    libraryVersion = '1.0.2'

    developerId = 'sumitdemo'
    developerName = 'sumit Tyagi'
    developerEmail = 'sumit.k@vcloudx.com'

    licenseName = 'The Apache Software License, Version 2.0'
    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
    allLicenses = ["Apache-2.0"]
}

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"

    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

        debug {

            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

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.1.0'
    testCompile 'junit:junit:4.12'
}

//Add these lines to publish library to bintray
//Place it at the end of the file
//apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'

现在我在app的.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:2.2.3' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() maven { url "http://jcenter.bintray.com" } } } task clean(type: Delete) { delete rootProject.buildDir }

我的Bintray图书馆项目在这里, https://bintray.com/shashank/WebViewOverlayvcx

你可以在这里找到我的Github回购,https://github.com/sumitdemo/mylibDemo

0 个答案:

没有答案