弹出ExpoKit后,Expo无法正常工作

时间:2020-04-19 15:20:41

标签: android react-native expo

我正在使用Expo应用程序,并且需要将此应用程序弹出ExpoKit,才能使用this library创建p2p聊天。当我设法使用ExpoKit弹出我的应用程序(我从终端的Expo收到“弹出成功消息”,所以我认为还可以)。现在,当我要构建我的项目时,甚至只是品尝一下它是否正在工作(无需更改代码,在使用expo start --lan弹出之前就可以工作)。这是此错误的完整堆栈跟踪。

dolidod@debian:~/PROJECT_DIR/android$ ./gradlew assembleDebug --stacktrace

FAILURE: Build failed with an exception.

* What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type FileHasher using BuildSessionScopeServices.createFileSnapshotter().

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.internal.service.ServiceCreationException: Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryMethodService.invokeMethod(DefaultServiceRegistry.java:823)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryService.create(DefaultServiceRegistry.java:774)
        at org.gradle.internal.service.DefaultServiceRegistry$ManagedObjectServiceProvider.getInstance(DefaultServiceRegistry.java:568)
        at org.gradle.internal.service.DefaultServiceRegistry$SingletonService.get(DefaultServiceRegistry.java:625)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryService.assembleParameters(DefaultServiceRegistry.java:787)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryService.create(DefaultServiceRegistry.java:773)
        at org.gradle.internal.service.DefaultServiceRegistry$ManagedObjectServiceProvider.getInstance(DefaultServiceRegistry.java:568)
        at org.gradle.internal.service.DefaultServiceRegistry$SingletonService.get(DefaultServiceRegistry.java:625)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryService.assembleParameters(DefaultServiceRegistry.java:787)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryService.create(DefaultServiceRegistry.java:773)
        at org.gradle.internal.service.DefaultServiceRegistry$ManagedObjectServiceProvider.getInstance(DefaultServiceRegistry.java:568)
        at org.gradle.internal.service.DefaultServiceRegistry$SingletonService.get(DefaultServiceRegistry.java:625)
        at org.gradle.internal.service.DefaultServiceRegistry.find(DefaultServiceRegistry.java:292)
        at org.gradle.internal.service.DefaultServiceRegistry.get(DefaultServiceRegistry.java:281)
        at org.gradle.internal.service.DefaultServiceRegistry.get(DefaultServiceRegistry.java:276)
        at org.gradle.initialization.DefaultGradleLauncherFactory.doNewInstance(DefaultGradleLauncherFactory.java:172)
        at org.gradle.initialization.DefaultGradleLauncherFactory.newInstance(DefaultGradleLauncherFactory.java:99)
        at org.gradle.composite.internal.DefaultRootBuildState.<init>(DefaultRootBuildState.java:46)
        at org.gradle.composite.internal.DefaultIncludedBuildRegistry.addRootBuild(DefaultIncludedBuildRegistry.java:85)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
        at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39)
        at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25)
        at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80)
        at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53)
        at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:62)
        at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:34)
        at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
        at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
        at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
        at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
        at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:59)
        at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
        at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59)
        at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44)
        at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:46)
        at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30)
        at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
        at org.gradle.util.Swapper.swap(Swapper.java:38)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:81)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
        at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: org.gradle.internal.service.ServiceCreationException: Could not create service of type FileHasher using BuildSessionScopeServices.createFileSnapshotter().
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryMethodService.invokeMethod(DefaultServiceRegistry.java:823)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryService.create(DefaultServiceRegistry.java:774)
        at org.gradle.internal.service.DefaultServiceRegistry$ManagedObjectServiceProvider.getInstance(DefaultServiceRegistry.java:568)
        at org.gradle.internal.service.DefaultServiceRegistry$SingletonService.get(DefaultServiceRegistry.java:625)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryService.assembleParameters(DefaultServiceRegistry.java:787)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryService.create(DefaultServiceRegistry.java:773)
        at org.gradle.internal.service.DefaultServiceRegistry$ManagedObjectServiceProvider.getInstance(DefaultServiceRegistry.java:568)
        at org.gradle.internal.service.DefaultServiceRegistry$SingletonService.get(DefaultServiceRegistry.java:625)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryService.assembleParameters(DefaultServiceRegistry.java:787)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryService.create(DefaultServiceRegistry.java:773)
        at org.gradle.internal.service.DefaultServiceRegistry$ManagedObjectServiceProvider.getInstance(DefaultServiceRegistry.java:568)
        at org.gradle.internal.service.DefaultServiceRegistry$SingletonService.get(DefaultServiceRegistry.java:625)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryService.assembleParameters(DefaultServiceRegistry.java:787)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryService.create(DefaultServiceRegistry.java:773)
        at org.gradle.internal.service.DefaultServiceRegistry$ManagedObjectServiceProvider.getInstance(DefaultServiceRegistry.java:568)
        at org.gradle.internal.service.DefaultServiceRegistry$SingletonService.get(DefaultServiceRegistry.java:625)
        at org.gradle.internal.service.DefaultServiceRegistry.find(DefaultServiceRegistry.java:292)
        at org.gradle.internal.service.DefaultServiceRegistry.get(DefaultServiceRegistry.java:281)
        at org.gradle.internal.service.DefaultServiceRegistry.get(DefaultServiceRegistry.java:276)
        at org.gradle.internal.service.scopes.BuildScopeServices.defaultScriptPluginFactory(BuildScopeServices.java:318)
        at org.gradle.internal.service.scopes.BuildScopeServices.createScriptPluginFactory(BuildScopeServices.java:310)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.internal.service.ReflectionBasedServiceMethod.invoke(ReflectionBasedServiceMethod.java:35)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryMethodService.invokeMethod(DefaultServiceRegistry.java:821)
        ... 63 more
Caused by: org.gradle.api.UncheckedIOException: java.io.FileNotFoundException: /home/dolidod/KORONAPIVOT/SkateAppFrontend/android/.gradle/4.10.2/fileHashes/fileHashes.lock (Permission denied)
        at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:57)
        at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:40)
        at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:110)
        at org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess.incrementLockCount(LockOnDemandCrossProcessCacheAccess.java:106)
        at org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess.acquireFileLock(LockOnDemandCrossProcessCacheAccess.java:165)
        at org.gradle.cache.internal.DefaultCacheAccess.onStartWork(DefaultCacheAccess.java:368)
        at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:213)
        at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:203)
        at org.gradle.cache.internal.DefaultCacheAccess.newCache(DefaultCacheAccess.java:298)
        at org.gradle.cache.internal.DefaultCacheAccess.newCache(DefaultCacheAccess.java:57)
        at org.gradle.cache.internal.DefaultPersistentDirectoryStore.createCache(DefaultPersistentDirectoryStore.java:160)
        at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.createCache(DefaultCacheFactory.java:185)
        at org.gradle.api.internal.changedetection.state.CrossBuildFileHashCache.createCache(CrossBuildFileHashCache.java:60)
        at org.gradle.api.internal.changedetection.state.CachingFileHasher.<init>(CachingFileHasher.java:45)
        at org.gradle.internal.service.scopes.BuildSessionScopeServices.createFileSnapshotter(BuildSessionScopeServices.java:161)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.internal.service.ReflectionBasedServiceMethod.invoke(ReflectionBasedServiceMethod.java:35)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryMethodService.invokeMethod(DefaultServiceRegistry.java:821)
        ... 89 more
Caused by: java.io.FileNotFoundException: /home/dolidod/KORONAPIVOT/SkateAppFrontend/android/.gradle/4.10.2/fileHashes/fileHashes.lock (Permission denied)
        at org.gradle.cache.internal.filelock.LockFileAccess.<init>(LockFileAccess.java:33)
        at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.<init>(DefaultFileLockManager.java:156)
        at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:107)
        ... 107 more


* Get more help at https://help.gradle.org

BUILD FAILED in 0s

在一些技巧之后,艾伦·约瑟夫(Allan Joseph)建议:https://pastebin.com/0HPdKzba(由于堆栈溢出后的正文限制,我使用了pastebin)。

此外,这是我的AndroidManifest.xml权限:

<?xml version="1.0" encoding="utf-8"?>
<manifest
  package="host.exp.exponent"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools">

  <permission
    android:name="skate.some.permission.C2D_MESSAGE"
    android:protectionLevel="signature"/>

  <!-- These are required permissions to make the app run -->
  <uses-permission android:name="skate.some.permission.C2D_MESSAGE" />
  <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
  <uses-permission android:name="android.permission.WAKE_LOCK" />

  <uses-permission android:name="android.permission.CAMERA" />
  <uses-feature android:name="android.hardware.camera" />
  <uses-feature android:name="android.hardware.camera.autofocus"/>

  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
  <uses-permission android:name="android.permission.RECORD_AUDIO" />
  <uses-permission android:name="android.permission.WAKE_LOCK" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

  <!-- ADD PERMISSIONS HERE -->
  <!-- BEGIN OPTIONAL PERMISSIONS -->
  <uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
  <uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.READ_PHONE_STATE" />
  <uses-permission android:name="android.permission.USE_FINGERPRINT" />
  <uses-permission android:name="android.permission.VIBRATE" />
  <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
  <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

  <!-- These require runtime permissions on M -->
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  <uses-permission android:name="android.permission.CAMERA" />
  <uses-permission android:name="android.permission.READ_CONTACTS" />
  <uses-permission android:name="android.permission.READ_CALENDAR" />
  <uses-permission android:name="android.permission.WRITE_CALENDAR" />
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.RECORD_AUDIO" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.WRITE_SETTINGS" />
  <!-- END OPTIONAL PERMISSIONS -->

  <!-- ADD TEST PERMISSIONS HERE -->

  <uses-feature android:glEsVersion="0x00020000" android:required="false" />
  <uses-feature android:name="android.software.leanback" android:required="false" />
  <uses-feature android:name="android.hardware.touchscreen" android:required="false" />

  <application

另外,这是我的package.json

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@babel/plugin-proposal-export-default-from": "^7.8.3",
    "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
    "@babel/polyfill": "^7.8.7",
    "@babel/preset-react": "^7.9.4",
    "@eva-design/eva": "^1.4.0",
    "@material-ui/core": "^4.9.4",
    "@react-native-community/masked-view": "^0.1.6",
    "@react-native-community/netinfo": "~3.2.1",
    "@react-native-community/slider": "^2.0.8",
    "@react-navigation/routers": "^5.0.1",
    "@ui-kitten/components": "^4.4.1",
    "@ui-kitten/date-fns": "^4.4.1",
    "@ui-kitten/eva-icons": "^4.4.1",
    "@ui-kitten/moment": "^4.4.1",
    "axios": "^0.19.2",
    "axois": "^0.0.1-security",
    "babel-plugin-module-resolver": "^4.0.0",
    "babel-preset-es2016": "^6.24.1",
    "babel-preset-react-native": "^5.0.2",
    "expo": "^35.0.0",
    "expo-av": "~7.0.0",
    "expo-constants": "~7.0.0",
    "expo-document-picker": "~7.0.0",
    "expo-font": "~7.0.0",
    "expo-image-picker": "~7.0.0",
    "expo-image-picker-multiple": "^1.1.5",
    "expo-multiple-imagepicker": "^1.0.6",
    "expo-secure-store": "~7.0.0",
    "expo-video-player": "^1.5.7",
    "expokit": "^35.0.4",
    "i": "^0.3.6",
    "metro-react-native-babel-preset": "^0.59.0",
    "native-base": "2.13.8",
    "npm": "^6.14.3",
    "react": "16.8.3",
    "react-bottom-scroll-listener": "^3.0.0",
    "react-dom": "16.8.3",
    "react-hot-loader": "^4.12.20",
    "react-material-ui-form-validator": "^2.0.9",
    "react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
    "react-native-axios": "^0.17.1",
    "react-native-device-uuid": "^1.2.0",
    "react-native-dialog": "^5.6.0",
    "react-native-document-picker": "^3.2.4",
    "react-native-elements": "^1.2.7",
    "react-native-form": "^2.1.3",
    "react-native-gesture-handler": "~1.3.0",
    "react-native-image-crop-picker": "^0.28.0",
    "react-native-maps": "~0.25.0",
    "react-native-material-design-searchbar": "^1.8.0",
    "react-native-material-textfield": "^0.16.1",
    "react-native-picker-select": "^6.5.0",
    "react-native-reanimated": "~1.2.0",
    "react-native-safe-area-context": "~0.3.6",
    "react-native-safe-area-view": "^1.0.0",
    "react-native-screens": "~1.0.0-alpha.23",
    "react-native-search-bar": "^3.5.1",
    "react-native-star-rating": "^1.1.0",
    "react-native-store-rating": "^1.0.1",
    "react-native-svg": "~9.9.2",
    "react-native-unimodules": "^0.6.0",
    "react-native-validator-form": "^1.0.0",
    "react-native-video": "^5.0.2",
    "react-native-web": "^0.11.7",
    "react-native-webrtc": "^1.75.3",
    "react-navigation": "^4.0.10",
    "react-navigation-drawer": "^2.3.2",
    "react-navigation-stack": "^1.10.3",
    "react-on-screen": "^2.1.1",
    "reconnecting-websocket": "^4.4.0",
    "socket.io-client": "^2.3.0",
    "tcomb-form-native": "^0.6.20",
    "url-search-params-polyfill": "^8.0.0"
  },
  "devDependencies": {
    "@babel/preset-typescript": "^7.9.0",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-preset-const-enum": "^0.0.1",
    "babel-preset-expo": "^7.1.0"
  },
  "private": true
}

1 个答案:

答案 0 :(得分:0)

检查该库的Android手动安装是否正确。浏览链接,然后再次验证。

Android Installation

此外,您的堆栈跟踪还会在以下几行中提及拒绝权限。检查您是否具有递归应用于项目文件夹中所有目录的写权限。如果没有,则授予该目录的写入和执行权限。

原因:org.gradle.api.UncheckedIOException: java.io.FileNotFoundException: /home/dolidod/KORONAPIVOT/SkateAppFrontend/android/.gradle/4.10.2/fileHashes/fileHashes.lock (权限被拒绝)

由于:java.io.FileNotFoundException: /home/dolidod/KORONAPIVOT/SkateAppFrontend/android/.gradle/4.10.2/fileHashes/fileHashes.lock (权限被拒绝)

要获得权限,请在终端上使用以下命令

chmod -R 777 /project-folder-path

对于您更新的其他错误

转到项目根文件夹,然后尝试以下命令。确保这些操作是在根文件夹而不是android文件夹中完成的。

rm -rf node_modules

npm install -g expo-cli

npm install

expo start or npm start

还要检查是否在AndroidManifest.xml文件中添加了以下权限。

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />