liaoyuan-io / react-native-multiple-image-picker

React Native Multiple Image Picker
MIT License
41 stars 11 forks source link

Android 编译报错 values-v24.xml 资源未找到 TextAppearance.Material.Widget.Button.Colored #11

Closed chuangbo closed 6 years ago

chuangbo commented 6 years ago

编译时遇到错误如下

/.../node_modules/react-native-multiple-image-picker/android/build/intermediates/res/merged/release/values-v24/values-v24.xml:3: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

/.../node_modules/react-native-multiple-image-picker/android/build/intermediates/res/merged/release/values-v24/values-v24.xml:4: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

/.../node_modules/react-native-multiple-image-picker/android/build/intermediates/res/merged/release/values-v24/values-v24.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

/.../node_modules/react-native-multiple-image-picker/android/build/intermediates/res/merged/release/values-v24/values-v24.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

:react-native-multiple-image-picker:processReleaseResources FAILED

FAILURE: Build failed with an exception.

搜索了一下说有可能是 compileSdkVersion 与 com.android.support:appcompat-v7 的版本不符合导致的,然后我将这两个都改为 23 以后,还是出现相同的错误。

不太熟悉 Android 开发,请问是我哪里配置错了吗?

测试是使用干净的 react-native init 的项目,然后加入 react-native-multiple-image-picker 编译的。

cnjsstong commented 6 years ago

你需要把版本设置为24。

    compileSdkVersion 24
    buildToolsVersion '24.0.1'
cnjsstong commented 6 years ago

目前最新的0.7.3版本需要版本至少为25 。