在应对本土项目摇篮@aar依赖解析 [英] Gradle @aar dependency resolution in react-native project

查看:234
本文介绍了在应对本土项目摇篮@aar依赖解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的的build.gradle 传递= TRUE 的@aar依赖。它下载到缓存的gradle,但是当应用程序被编译没有得到解决。

I'm using an @aar dependency with transitive=true in build.gradle. It's downloaded to the gradle cache, but isn't resolved while the app is being compiled.

这可能会或可能不相关,但我使用它在一个反应​​原生应用程序。在构建其他依赖编译没有问题。

It may or may not be relevant, but I'm using it in a react-native app. The other dependencies in the build are compiled without a problem.

没有人有经验处理此类问题?

Does anyone have experience dealing with this type of issue?

推荐答案

我想通了,这是一个反应原生的问题。如果您正在加载包中的@aar依赖你还需要将其声明为在资源库
的Andr​​oid /的build.gradle
在块

I figured out that it was a react-native issue. If you are loading a @aar dependency in a package you also need to declare it as a repository in android/build.gradle in the block

allprojects {
  repositories {
    mavenLocal()
    jcenter()
    DESIRED_REMOTE_REPO_HERE
  }
}

这篇关于在应对本土项目摇篮@aar依赖解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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