在应用程序中导入我的图书馆 [英] import my library in app

查看:132
本文介绍了在应用程序中导入我的图书馆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了android库,并尝试在其他应用程序"compileOnly"中导入该库

I developed android library and I tried import this library in other app "compileOnly"

dependencies {
    compileOnly 'xxx.xxx.xxx:xx-xx-xx:1.0'
}

但是gradle告诉我:

but gradle show me:

"Android依赖项'xxx-xxx-xxx:xx-xx-xx:1.0'被设置为compileOnly/提供,不支持"

"Android dependency 'xxx-xxx-xxx:xx-xx-xx:1.0' is set to compileOnly/provided which is not supported"

有什么主意吗?

推荐答案

Android依赖项(AAR)可以提供构建输出中必须可用的资源,例如可绘制对象和布局文件.在构建输出中不包含compileOnly/provided依赖项,因此两者不兼容.

Android dependencies (AARs) can provide resources such as drawables and layout files that must be available in the build output. A compileOnly/provided dependency is not included in the build output, and thus the two are not compatible.

这篇关于在应用程序中导入我的图书馆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆