以下の内容はhttps://www.aruse.net/entry/2019/09/01/062820より取得しました。


(Solved)React Native:エラー: シンボルを見つけられません:import androidx.annotation.Nullable

React Native + Expoのプロジェクトを、expo ejectしてreact-native run-androidをしたところ、以下のエラーが出力されました。

/Users/xxxxx/Projects/ejecttest/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsService.java:6: エラー: シンボルを見つけられません

import androidx.annotation.Nullable

なにもしていないプロジェクトのままだったので、なんで?とは思ったものの調べてみると設定が足りないとのこと。

android/gradle.propertiesに以下の2行を追加して再実行することでエラーは出力されなくなりました。

android.useAndroidX=true
android.enableJetifier=true
  • 参考サイト

github.com




以上の内容はhttps://www.aruse.net/entry/2019/09/01/062820より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14