autolinking.gradle不存在错误时,excuting expo运行:android

aemubtdh  于 2023-03-13  发布在  Android
关注(0)|答案(1)|浏览(382)

我尝试通过执行expo run:android在Android上运行我的Android Expo项目,但遇到此错误

这是我的settings.gradle文件

rootProject.name = 'K53Learners'

apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle");
useExpoModules()

apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
applyNativeModulesSettingsGradle(settings)

include ':app'
includeBuild(new File(["node", "--print", "require.resolve('react-native-gradle-plugin/package.json')"].execute(null, rootDir).text.trim()).getParentFile())

if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
  include(":ReactAndroid")
  project(":ReactAndroid").projectDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../ReactAndroid");
  include(":ReactAndroid:hermes-engine")
  project(":ReactAndroid:hermes-engine").projectDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../ReactAndroid/hermes-engine");
}
hvvq6cgz

hvvq6cgz1#

在我的例子中,我使用bareworkflow expo,并运行:
npm audit fix --force
这破坏了构建,但我再次运行它,然后它修复了它

相关问题