【问题标题】:Android 3rd Party Library IntegrationAndroid 3rd 方库集成
【发布时间】:2016-01-02 13:37:24
【问题描述】:

这有点疯狂。我已经经常使用 3rd 方库。我所要做的就是在构建 gradle 中添加编译命令,但在这种情况下它有所不同。这是我要实现的lib的github链接:

Link to github

我尝试手动集成我需要的文件,但出现了很多错误。 在自述文件中,开发人员说:

此库以 AAR 格式提供。源 jar 文件不会自动下载(由于当前 Gradle 和 Android Studio 的限制),因此 javadoc cmets 不会显示在 IDE 上。

有人可以帮助我如何以最好的方式整合它。

【问题讨论】:

    标签: java android github integration


    【解决方案1】:

    如果您在下面查看,他们已经提供了解决方法

    buildscript {
        repositories {
            maven { url 'https://raw.github.com/xujiaao/mvn-repository/master/releases' }
        }
    
        dependencies {
            classpath 'com.github.xujiaao:aarLinkSources:1.0.0'
        }
    }
    
    apply plugin: 'com.android.application'
    apply plugin: 'aar-link-sources'
    
    android {
        ...
    }
    
    dependencies {
        compile ('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.8.0@aar'){
            transitive=true
        }
        aarLinkSources 'com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.8.0:sources@jar'
    }
    

    【讨论】:

    • 我无法访问 Android Studio 中的库:无法解析符号“nameofaclass”
    猜你喜欢
    • 2017-01-10
    • 1970-01-01
    • 1970-01-01
    • 2014-04-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-17
    • 2019-07-18
    相关资源
    最近更新 更多