Bare React Native Up and Running (Expo), Expo-web-browser:co



我试图按照世博会文档进行原生反应(链接)。

我在 Linux Manjaro 中的 android 模拟器上运行。

安装expo init --template bare-minimum后,react-native run-android模拟器工作正常。

但是,在我运行npm install expo-web-browser之后,它给出了此错误。


FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':expo-web-browser:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
$react-native info
info 
React Native Environment Info:
System:
OS: Linux 4.19 Manjaro Linux undefined
CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Memory: 160.20 MB / 7.52 GB
Shell: 5.0.11 - /bin/bash
Binaries:
Node: 12.11.1 - /usr/bin/node
npm: 6.12.0 - /usr/bin/npm
SDKs:
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64
npmPackages:
react: 16.8.3 => 16.8.3 
react-native: 0.59.10 => 0.59.10 
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1

编辑了build.gradle的implementation "com.facebook.react:react-native:0.59.10" // From node_modules

编辑:

模块,主要是给我compileDebugJavaWithJavac错误。可能没有正确设置环境?

找到答案

这是由于Android到Android X的迁移,其中映射已更改。如android.support.annotation.Nullableandroidx.annotation.Nullable.

有很多,我记不清了。但是,如果您在Android Studio中运行它们,则尝试构建它,它会告诉您错误的位置和行,因此您可以在此链接中搜索它们

最新更新