react-native-macos/ReactAndroid
Daniel Abramowitz a3e25b23c6 Improve exception thrown when classes can't compile to be more clear (#33897)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33897

Now the exception will display the class which caused the exception as well as helpful information as to why.

We've seen this happen a bunch due and have been very confused by the error message. It turns out that this processor runs before the classes listed are compiled. This means that if there's a compile error (or a missing import) the user will only see that this processor crashed, and not the compile error.

The additional information in the error is:

`java.lang.RuntimeException: Could not load classes set in ReactModuleList.nativeModules. Check that they exist and are imported correctly on class: com.meta.x.y.ReactPackage`

In this case,  `com.meta.x.y.ReactPackage` is the class which needs to be fixed. Before, the error message made no mention of this class or the annotation.

Changelog: [Internal] This will change the way the annotation processor crashes. It will throw a RuntimeException instead of a ClassCastException.

Reviewed By: javache

Differential Revision: D36606279

fbshipit-source-id: aedf9682286fba49e23716b7eda16b2dd3b13422
2022-05-26 08:13:22 -07:00
..
hermes-engine Disable Javadoc publishing as it's currently failing on CI 2022-05-18 11:48:16 -07:00
libs Upgrade Android support library to version 28 in RN 2019-01-22 10:44:53 -08:00
src Improve exception thrown when classes can't compile to be more clear (#33897) 2022-05-26 08:13:22 -07:00
.npmignore Do not publish Android tests inside the NPM package 2022-05-23 12:28:33 -07:00
Android-prebuilt.mk Bump boost for Android to 1.76 to align with iOS + fix (#33565) 2022-04-07 04:50:30 -07:00
DevExperience.md Fix Dead links to documents in the comments (#32619) 2021-11-22 03:31:10 -08:00
README.md docs: Fix dead links in README for rn-tester (#31901) 2021-07-27 11:01:47 -07:00
build.gradle Set root to be `..` for ReactAndroid 2022-05-23 09:40:29 -07:00
gradle.properties Bump boost for Android to 1.76 to align with iOS + fix (#33565) 2022-04-07 04:50:30 -07:00
proguard-rules.pro Cleanup OSS proguard rules and add @DoNotStripAny 2022-02-02 12:54:34 -08:00

README.md

Building React Native for Android

See the docs on the wiki.

Running tests

When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.