我是反应本机开发的新手,我尝试通过运行 npx expo run:android 在我的物理设备上运行该应用程序,然后出现异常错误。这个应用程序没有任何更改,但我只是想检查是否可以在我的 Android 设备上运行它。
› Building app...
Picked up JAVA_TOOL_OPTIONS: -Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8
Starting a Gradle Daemon, 2 incompatible and 3 stopped Daemons could not be reused, use --status for details
Configuration on demand is an incubating feature.
Configure project :expo
Using expo modules
- expo-asset (11.0.1)
- expo-constants (17.0.3)
- expo-file-system (18.0.4)
- expo-font (13.0.1)
- expo-keep-awake (14.0.1)
- expo-modules-core (2.1.1)
Task :app:processDebugMainManifest
C:\Users\gerar\Desktop\Programming\React_Native\GS-Point-Out-System\android\app\src\debug\AndroidManifest.xml:6:5-162 Warning:
application@android:usesCleartextTraffic was tagged at AndroidManifest.xml:6 to replace other declarations but no other declaration present
C:\Users\gerar\Desktop\Programming\React_Native\GS-Point-Out-System\android\app\src\debug\AndroidManifest.xml Warning:
provider#expo.modules.filesystem.FileSystemFileProvider@android:authorities was tagged at AndroidManifest.xml:0 to replace other declarations but no other declaration present
Task :app:configureCMakeDebug[arm64-v8a] FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:configureCMakeDebug[arm64-v8a]'.
> [CXX1210] C:\Users\gerar\Desktop\Programming\React_Native\GS-Point-Out-System\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup\CMakeLists.txt debug|arm64-v8a : No compatible library found
* Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
BUILD FAILED in 1m 56s
143 actionable tasks: 67 executed, 76 from cache
Error: C:\Users\gerar\Desktop\Programming\React_Native\GS-Point-Out-System\android\gradlew.bat app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a,armeabi-v7a exited with non-zero code: 1
Error: C:\Users\gerar\Desktop\Programming\React_Native\GS-Point-Out-System\android\gradlew.bat app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a,armeabi-v7a exited with non-zero code: 1
at ChildProcess.completionListener (C:\Users\gerar\Desktop\Programming\React_Native\GS-Point-Out-System\node_modules\@expo\spawn-async\src\spawnAsync.ts:67:13)
at Object.onceWrapper (node:events:630:26)
at ChildProcess.emit (node:events:515:28)
at ChildProcess.cp.emit (C:\Users\gerar\Desktop\Programming\React_Native\GS-Point-Out-System\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1105:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:305:5)
...
at spawnAsync (C:\Users\gerar\Desktop\Programming\React_Native\GS-Point-Out-System\node_modules\@expo\spawn-async\src\spawnAsync.ts:28:21)
at spawnGradleAsync (C:\Users\gerar\Desktop\Programming\React_Native\GS-Point-Out-System\node_modules\@expo\cli\src\start\platforms\android\gradle.ts:134:28)
at assembleAsync (C:\Users\gerar\Desktop\Programming\React_Native\GS-Point-Out-System\node_modules\@expo\cli\src\start\platforms\android\gradle.ts:83:16)
at runAndroidAsync (C:\Users\gerar\Desktop\Programming\React_Native\GS-Point-Out-System\node_modules\@expo\cli\src\run\android\runAndroidAsync.ts:48:24)
我还没有尝试过任何事情,因为当我尝试查找有关错误 CXX1210 的任何文章时,似乎很少而且还没有回答。 (抱歉我的英语不好)
你有什么版本的react-native?您使用的是“新架构”吗?