Android中的嵌套库访问

时间:2016-05-06 09:44:13

标签: android

我在Android Studio中创建了一个使用齐射功能的库(名为xyz)。 我在库xyz的build gradle中使用以下命令导入了齐射:  编译'com.mcxiaoke.volley:library:1.0.19'

我创建了一个新项目测试,其中 libs 文件夹包含 xyz库的 aar 文件。 并使用命令导入:编译(名称:'xyz-debug',分机:'aar')

在测试项目的主要活动中我调用了xyz库的功能,除了当我尝试直接使用任何Volley功能时,我无法访问它。

如果有人能帮助我,那就太好了。提前致谢

1 个答案:

答案 0 :(得分:0)

您可能不包含aar文件,但在应用程序的build.gradle中包含库项目

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile project(':xyzlibrary')  // this is the key
}