tolu360 / react-native-google-places

iOS/Android Google Places Widgets (Autocomplete Modals) and API Services for React Native Apps
567 stars 289 forks source link

[Solved] react-native-google-places:compileReleaseJavaWithJavac FAILED assembling release #266

Closed brownieboy closed 4 years ago

brownieboy commented 4 years ago

Building a release Android version of my app by running ./gradlew assembleRelease choked on this line for me:

Task :react-native-google-places:compileReleaseJavaWithJavac FAILED /Users/michaelbrown/Development/manlyhappyhour/apps/manly-happy-hour/node_modules/react-native-google-places/android/src/main/java/com/arttitude360/reactnative/rngoogleplaces/RNGooglePlacesPlaceFieldEnum.java:4: error: package android.support.annotation does not exist import android.support.annotation.Nullable;

brownieboy commented 4 years ago

This is an AndroidX issue. The quick fix was to run react-native run-android immediately before trying to assemble a release version.

You don't need to let react-native run-android run to finish either. As soon as you see a line like this:

Jetifier found 2667 file(s) to forward-jetify. Using 4 workers...

you can ctrl->c out of the react-native command and then try /gradlew assembleRelease again.

NathHorrigan commented 1 year ago

It's easier to just run: npx jetify