prscX / react-native-spruce

React Native Bridge for Native Spruce Animation Library
https://github.com/willowtreeapps/spruce-android
Apache License 2.0
531 stars 33 forks source link

app:processDebugResources Error retrieving parent for item (values-v24.xml) #3

Closed joaoalbertocsjunior closed 6 years ago

joaoalbertocsjunior commented 6 years ago

I've managed to react-native link by re-creating the project.

Now, when i try to react-native run-android the application, build fails.

Here is the error:

:app:processDebugResources

C:\Users\mtlok\Desktop\pep\myspruce\android\app\build\intermediates\res\merged\debug\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'.

C:\Users\mtlok\Desktop\pep\myspruce\android\app\build\intermediates\res\merged\debug\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'.

:app:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> 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

I have done something wrong? Why this is saying there is missing resource files?

prscX commented 6 years ago

Not sure @joaoalbertocsjunior, There are multiple solutions we can try:

Thanks Pranav

joaoalbertocsjunior commented 6 years ago

I will try and i will bring the results. Thank you again @prscX !

joaoalbertocsjunior commented 6 years ago

What i've learned so far:

I already have Android SDK 23.

gradlew clean does not work.

Im using a physical device with api 22. This might be the reason i'am facing this issue?

prscX commented 6 years ago

Not sure @joaoalbertocsjunior, is your app open source? if yes, I can download your project and try to build the same on my end.

Thanks Pranav

joaoalbertocsjunior commented 6 years ago

This happens on a fresh created RN app. Already tried to re-create the project 3 times, but everytime when i yarn add react-native-spruce and react-native link, i get the same error.

I'm really thinking this might be caused due to my physical device being API 22, not 23. If i can test on an API >= 23 device, or if someone try to reproduce it on an API <= 22 device, we might find issue cause.

prscX commented 6 years ago

I will also check from my end, meantime can you please download API >= 23 device and verify the same.

Thanks Pranav

joaoalbertocsjunior commented 6 years ago

Installing build tools >= 24 solved the issue. Material was introduced in API 24.

prscX commented 6 years ago

Thanks @joaoalbertocsjunior for verifying the same. I will specify the same in README.

Let me know in case you face any issues

Thanks Pranav

prscX commented 6 years ago

Hi @joaoalbertocsjunior, Can I close the raised issue?

Thanks Pranav

prscX commented 6 years ago

Hi @joaoalbertocsjunior, Closing this issue for now. Let me know in case you face any issues.

Thanks Pranav