apk中缺少资源

问题描述 投票:0回答:1

我正在尝试将.wav文件添加到我的React Native应用中,并且Android实现存在问题。该文件不断从构建中删除(当我解压缩apk时,它在res / raw文件夹中丢失)。

文件夹结构:

enter image description here

keep.xml内容:

<?xml version="1.0" encoding="utf-8"?>
<resources
    xmlns:tools="http://schemas.android.com/tools"
    tools:keep="@raw/push_notification_sound"
/>

在所有构建类型的build.gradle中均禁用了缩小和缩小:

minifyEnabled false
shrinkResources false

任何想法可能是这背后的原因吗?

android react-native android-gradle-plugin proguard
1个回答
0
投票

我的坏人应该将资产放入android/app/src/main/res/raw/

© www.soinside.com 2019 - 2024. All rights reserved.