- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在维护一个 brownfield react-native 应用程序,并将 react-native 版本从 0.59.9 迁移到 0.63.4。我完成了更改日志和升级助手中定义的步骤,并且可以在模拟器上运行该应用程序,但是当我尝试构建它时,我在 bundleDebugAar
步骤中遇到此错误:
> Direct local .aar file dependencies are not supported when building an
AAR. The resulting AAR would be broken because the classes and Android
resources from any local .aar file dependencies would not be packaged in
the resulting AAR. Previous versions of the Android Gradle Plugin produce
broken AARs in this case too (despite not throwing this error). The
following direct local .aar file dependencies of the :myapp-react-
integration project caused this error: /Users/.../node_modules/hermes-
engine/android/hermes-release.aar
渐变版本:
const val BUILD_TOOLS_VERSION = "30.0.1"
const val GRADLE_VERSION = "4.0.1"
这是我的 build.gradle.kts:
plugins {
id(BuildPlugins.androidLibrary)
id(BuildPlugins.kotlinAndroid)
id(BuildPlugins.kotlinAndroidExtensions)
id(BuildPlugins.kotlinKapt)
id(BuildPlugins.junit)
}
android{
androidExtensions {
isExperimental = true
}
}
val react by extra {
mapOf(
"enableHermes" to true
)
}
dependencies {
// Dependencies for local unit tests
// JUnit and Mockito
junit5()
mockito()
testImplementation(TestLibraries.JUNIT4)
api(Libraries.REACT_NATIVE)
implementation("com.facebook.soloader:soloader:0.9.0")
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
implementation(Libraries.Tracking.SNOWPLOW)
implementation(project(Libraries.Tracking.BRAZE_REACT_NATIVE))
rx()
dagger()
firebase()
implementation(Libraries.gson)
implementation(Libraries.Timber)
implementation(Libraries.AndroidX.PREFERENCE)
implementation(TestLibraries.Espresso.IDLING)
androidTestRuntimeOnly(TestLibraries.Junit5.RUNNER)
/********************************************/
/* REACT */
/** ******************************************/
val hermesPath = "$rootDir/node_modules/hermes-engine/android/"
debugImplementation(files(hermesPath + "hermes-debug.aar"))
releaseImplementation(files(hermesPath + "hermes-release.aar"))
}
如果有人能提供帮助,我会很高兴。
谢谢。
最佳答案
Hermes 在最近版本的 react-native 中移动,而不是:
val hermesPath = "$rootDir/node_modules/hermes-engine/android/"
debugImplementation(files(hermesPath + "hermes-debug.aar"))
releaseImplementation(files(hermesPath + "hermes-release.aar"))
做
implementation("com.facebook.react:hermes-engine:+") { // From node_modules
exclude group:'com.facebook.fbjni'
}
关于由于 hermes-debug.aar 引用,gradle bundleDebugAar 步骤失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66168353/
我们向客户发送了一个 android sdk (aar) 文件。我们的代码在内部使用两个第 3 方 aar,我们在我们的 repo 和 gradle 在运行时引用它。我的问题是如何将这些依赖项发送给客
我正在努力构建可用于其他应用程序的 SDK。 我的项目结构如下: ProjectFolder | +--AndroidLibs | | | +--UI (andro
如果我有作为 SDK 的项目 A,并且它作为 AAR 导出到项目 B 中,项目 B 将模块作为 AAR 导入,我该如何链接这两个模块,所以对项目 B 中的 AAR 所做的更改不会必须在原始项目-A中复
我是一名插件开发人员,我的插件依赖于两个 aar 库。当我导出为 aar 存档时,我的依赖库不是它的一部分。我的项目结构如下所述 App lib1 --aartool lib2 lib3
我有一个以 aar 格式分发的 android 库。它重300kb。我想创建另一个库,也是 aar 格式,其中依赖项中的第一个库。但是结果库权重是30kb,显然不包括第一个库。 我尝试使用 flatD
如何访问 AAR 库中的 Activity,它不是直接包含在项目中而是嵌入到另一个 AAR 库中? 我得到一个错误 java.lang.NoClassDefFoundError: Failed res
你能帮我理解构建 android 库并在用户应用程序中使用它的一般概念吗。 那么,有以下情况: 在android studio中有以下模块: 核心 数据 绘图 还有一个模块 应用 依赖于上述模块。 a
关于 Gradle 中 AAR 文件的传递依赖关系存在一些问题: Android Studio 0.2.3 cannot resolve transitive aar dependencies And
我看到了各种开发人员发布的问题(Android Studio combine 2 .aar into one 和其他人),但我还没有看到明确的答复使我能够创建一个包含 1 个或多个 AAR 或 JAR
我正在使用Xamarin开发一个APP,需要使用Android Studio(AS)开发的其他aar。 在 AS 中,我创建了一个名为“javaLib”的 Java 库模块。构建后,我得到了javaL
无法发布配置“文件”,无法发布 Artifact danlu-bluetooth.aar (/Users/xxx/work/xxx/workplace/androidcode/libraray/xxx
我正在使用 Android Studio 1.5。我有一个图书馆项目,core-speech-service.aar。此 AAR 文件已正确生成(所有类都构建并打包在 AAR 文件中的 classes
我写了一些库,它有一部分 UI。此外,此库使用其他库。我想提供版本 .aar 以在任何应用程序中使用此 UI 部分。 我的图书馆有下一个依赖: compile 'com.android.sup
所以,事情是这样的,我有一个 .aar 文件,当我将它添加为依赖项时,如下所示: 编译('com.foo:bar:1.0.0@aar') 它生成以下文件: build > intermediates
我正在使用另一个 aar 和 jar 文件依赖项创建 AAR 文件。我已成功创建 .aar 发布文件。 然后,我将新的 AAR 文件导入到示例项目中。该项目运行良好。当访问 aar 和 jar 类时,
我正在创建一个具有“directions-api.aar”(Here-Maps 小部件库)的旧依赖项的 android 应用程序,现在我需要为 Map 的实现添加“HERE-sdk.aar”。 这导致
我通过将我的应用程序转换为库来为应用程序贴上白色标签,并且我有一个配置文件被传递到库以更改颜色、添加新的加载动画、更改一些文本等。库拥有所有这些上面列出的依赖项。当我将库导入新应用程序时,由于新应用程
我有一个顶级 android 库模块(包含 res 文件夹)依赖于其他库子模块(无 res)。我想构建一个顶层模块的 fat aar,它应该包括子模块的 jar 以及我在 build.gradle 中
我在 Intranet maven repo 中有一个 utility.aar。它使用了一些众所周知的 jar ,例如 gson。我已将它们定义为实用程序模块的 build.gradle 中的编译依赖
我正在按照 camera_deep_ar 上的插件页面中给出的文档进行操作 我已将 minimumSdkVersion 设置为 19 在 AndroidManifest.xml 中正确赋予权限 正确设
我是一名优秀的程序员,十分优秀!