Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RN v.60 and androidX compile error #34

Closed
1 of 2 tasks
sytolk opened this issue Oct 16, 2019 · 1 comment
Closed
1 of 2 tasks

RN v.60 and androidX compile error #34

sytolk opened this issue Oct 16, 2019 · 1 comment
Assignees

Comments

@sytolk
Copy link

sytolk commented Oct 16, 2019

Issue

deprecated android.support library is replaced with androidX https://developer.android.com/jetpack/androidx/migrate/artifact-mappings
Build succeeds with react-native run-android but for e2e testing with detox its need to build with /gradlew app:assembleDebug

cd android && ./gradlew app:assembleDebug 

> Task :react-native-settings:compileDebugJavaWithJavac FAILED
/home/stanimir/structmedia/drive/DriveApp/node_modules/react-native-settings/android/src/main/java/io/rumors/reactnativesettings/RNSettingsModule.java:9: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;
                                 ^
/home/stanimir/structmedia/drive/DriveApp/node_modules/react-native-settings/android/src/main/java/io/rumors/reactnativesettings/RNSettingsModule.java:84: error: cannot find symbol
  private void sendEvent(String eventName, @Nullable WritableMap params) {

Project Files

Android

Click To Expand

android/gradle.properties:

android.useAndroidX=true
android.enableJetifier=true

MainApplication.java:

This not need for RN v60 have autolinking

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

info Fetching system and libraries information...
System:
OS: Linux 4.9 Debian GNU/Linux 9 (stretch) 9 (stretch)
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 289.88 MB / 12.73 GB
Shell: 4.4.12 - /bin/bash
Binaries:
Node: 12.11.1 - ~/.nvm/versions/node/v12.11.1/bin/node
Yarn: 1.12.3 - /usr/bin/yarn
npm: 6.11.3 - ~/.nvm/versions/node/v12.11.1/bin/npm
Watchman: 4.7.0 - /usr/local/bin/watchman
SDKs:
Android SDK:
API Levels: 23, 24, 27, 28, 29
Build Tools: 19.0.3, 19.1.0, 20.0.0, 21.0.1, 21.1.1, 21.1.2, 22.0.1, 23.0.0, 23.0.1, 23.0.2, 23.0.3, 24.0.0, 24.0.1, 24.0.2, 24.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.1, 27.0.2, 27.0.3, 28.0.3, 29.0.1, 29.0.2
System Images: android-24 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5900203
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.6 => 0.60.6

  • Platform that you're experiencing the issue on:
    • iOS
    • Android

@sytolk
Copy link
Author

sytolk commented Oct 16, 2019

Adding npx jetifier before assembleDebug fix build

npx jetifier && cd ./android && ./gradlew app:assembleDebug

@sytolk sytolk closed this as completed Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants