alinz / react-native-share-extension

react-native as an engine to drive share extension
MIT License
762 stars 396 forks source link

react-native-share-extension:verifyReleaseResources failed in Android #137

Closed leiz-me closed 5 years ago

leiz-me commented 5 years ago

Yes, again, got another problem. iOS works very well currently. So it comes to Android.

After I configured all the files that mentioned in the instructions, got Execution failed for task ':react-native-share-extension:verifyReleaseResources'. while building the project.

the log as below

Execution failed for task ':react-native-share-extension:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  Output:  error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
  error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
  /Users/lei/code/projects/xxxxx/node_modules/react-native-share-extension/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:7: error: resource android:attr/colorError not found.
  /Users/lei/code/projects/xxxxx/node_modules/react-native-share-extension/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:11: error: resource android:attr/colorError not found.
  /Users/lei/code/projects/xxxxx/node_modules/react-native-share-extension/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
  /Users/lei/code/projects/xxxxx/node_modules/react-native-share-extension/android/build/intermediates/res/merged/release/values/values.xml:226: error: resource android:attr/fontStyle not found.
  /Users/lei/code/projects/xxxxx/node_modules/react-native-share-extension/android/build/intermediates/res/merged/release/values/values.xml:226: error: resource android:attr/font not found.
  /Users/lei/code/projects/xxxxx/node_modules/react-native-share-extension/android/build/intermediates/res/merged/release/values/values.xml:226: error: resource android:attr/fontWeight not found.
  error: failed linking references.

Any idea?

isaachinman commented 5 years ago

Did you read the error output?

error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found

leiz-me commented 5 years ago

I noticed that output, but no idea why this happened, the main app has no such problem.

isaachinman commented 5 years ago

Did you do a search in your project for this resource?

leiz-me commented 5 years ago

@isaachinman Sure. And nothing came out.

isaachinman commented 5 years ago

Without a reproducible example or more information it is basically impossible to help.

leiz-me commented 5 years ago

I found some clues that it is a bug due to the sdk version. https://stackoverflow.com/questions/49331411/errorresource-androidstyle-textappearance-material-widget-button-borderless-co

And I am working on it.

isaachinman commented 5 years ago

Okay, let us know what you find.

leiz-me commented 5 years ago

Well, all of a sudden, it just worked, and still have no idea why. Though I did have some point from this post, https://stackoverflow.com/questions/50574492/react-native-error-resource-androidstyle-textappearance-material-widget-butto