反应原生 react-native-mauron85-background-geolocation:processReleaseResources FAILED

Posted

技术标签:

【中文标题】反应原生 react-native-mauron85-background-geolocation:processReleaseResources FAILED【英文标题】:react native react-native-mauron85-background-geolocation:processReleaseResources FAILED 【发布时间】:2018-05-29 10:55:26 【问题描述】:

一切正常,然后突然出现以下错误

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex

:react-native-mauron85-background-geolocation:processReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-mauron85-background-geolocation:processReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 23.413 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

【问题讨论】:

【参考方案1】:

我设法通过更改 node_modules/react-native-mauron85-background-geolocation/android/lib/build.gradle 中的一行来解决此问题 来自

compile 'com.android.support:support-v4:+'

compile 'com.android.support:support-v4:23.+'

【讨论】:

如果要使用最新的支持库,则需要使用android-P SDK(因为最新的支持库使用的是P中添加的资源)。您可以在 SDK 管理器中下载 android-P 预览版,然后在 build.gradle 文件中更新您的编译 SDK 版本。

以上是关于反应原生 react-native-mauron85-background-geolocation:processReleaseResources FAILED的主要内容,如果未能解决你的问题,请参考以下文章

反应原生模态时间延迟和生涩的动画

在启动画面上反应原生应用程序 firebase 崩溃报告

在拍摄多张照片时反应原生路由器通量和反应原生相机问题

使用故事书中的反应原生矢量图标反应原生 Web 问题

反应原生原生模块 RCTBubblingEventBlock 为空

如何在反应原生网格图像查看器中传递动态获取的图像数组数据,并在反应原生中使用标题