Pushwoosh / pushwoosh-react-native-plugin

Other
57 stars 43 forks source link

Strange android build error #125

Closed Dkokkonas closed 2 years ago

Dkokkonas commented 2 years ago

Package Version: 6.1.5 react-native-version: 0.61.5

Recently we are facing this issue when we try build the android version. (both debug and release)

.gradle/caches/transforms-2/files-2.1/8ae9fc4d58132658c0f85aa857f01c0a/res/values-v31/values-v31.xml:3:5-94: AAPT: error: resource android:color/system_neutral1_1000 not found. .gradle/caches/transforms-2/files-2.1/8ae9fc4d58132658c0f85aa857f01c0a/res/values-v31/values-v31.xml:4:5-94: AAPT: error: resource android:color/system_neutral1_900 not found. .gradle/caches/transforms-2/files-2.1/8ae9fc4d58132658c0f85aa857f01c0a/res/values-v31/values-v31.xml:5:5-93: AAPT: error: resource android:color/system_neutral1_0 not found. .gradle/caches/transforms-2/files-2.1/8ae9fc4d58132658c0f85aa857f01c0a/res/values-v31/values-v31.xml:6:5-94: AAPT: error: resource android:color/system_neutral1_800 not found. .gradle/caches/transforms-2/files-2.1/8ae9fc4d58132658c0f85aa857f01c0a/res/values-v31/values-v31.xml:7:5-94: AAPT: error: resource android:color/system_neutral1_700 not found. .gradle/caches/transforms-2/files-2.1/8ae9fc4d58132658c0f85aa857f01c0a/res/values-v31/values-v31.xml:8:5-94: AAPT: error: resource android:color/system_neutral1_600 not found. .gradle/caches/transforms-2/files-2.1/8ae9fc4d58132658c0f85aa857f01c0a/res/values-v31/values-v31.xml:9:5-94: AAPT: error: resource android:color/system_neutral1_500 not found. .gradle/caches/transforms-2/files-2.1/8ae9fc4d58132658c0f85aa857f01c0a/res/values-v31/values-v31.xml:10:5-94: AAPT: error: resource android:color/system_neutral1_400 not found. .gradle/caches/transforms-2/files-2.1/8ae9fc4d58132658c0f85aa857f01c0a/res/values-v31/values-v31.xml:11:5-94: AAPT: error: resource android:color/system_neutral1_300 not found. .gradle/caches/transforms-2/files-2.1/8ae9fc4d58132658c0f85aa857f01c0a/res/values-v31/values-v31.xml:12:5-94: AAPT: error: resource android:color/system_neutral1_200 not found.

The strange thing is that the issue appeared without us making any changes at all.

We also found out that if we downgrade to 5.20.8 this issue doesn't happen .

We have tried to define the colors on colors.xml but the issue remains .

wfhm commented 2 years ago

@Dkokkonas,

The error AAPT: error: resource android: <…> not found is usually thrown when the version of the Android Support library used in your project is different from the compileSdkVersion.

Please check that your compileSdkVersion in all Gradle files ('app' build.gradle and 'project' build.gradle) corresponded with targetSdkVersion, buildToolsVersion, and supportLibVersion.

Also, I've noticed that your react-native version is quite outdated. The 0.61.5 was released on Nov 23, 2019. The latest release is 0.65.1 released on Aug 20,2021.

May I ask you to perform a few things:

  1. Set the correct SdkVersions in the Gradle;
  2. Update the react-native to the latest release.

Please let me know about the results!

Dkokkonas commented 2 years ago

@wfhm Thanks for the response. After a lot of searching I found that the problem came from this release https://github.com/material-components/material-components-android/releases/tag/1.5.0-alpha03

Not sure why though.

I found out that one solution is to put on my dependencies on app/build.gradle this implementation 'com.google.android.material:material:1.5.0-alpha02'

Sorry but I can not update easily to the latest react-native and test there if it's still present.

wfhm commented 2 years ago

@Dkokkonas will be fixed with the next release.

wfhm commented 2 years ago

@Dkokkonas

Fixed with the latest release.