当我尝试用VS code中的命令运行代码时,模拟器打开得很好,但代码没有在上面运行。有些问题我解决不了。请帮帮我!以下是错误-
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
(node:7884) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency(Use `node --trace-warnings ...` to show where the warning was created)
Jetifier found 870 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Launching emulator...
info Successfully launched emulator.
info Installing the app...
FAILURE: Build failed with an exception.
* Where:
Settings file 'D:\OLA\OlaProject\android\settings.gradle'
* What went wrong:
Could not compile settings file 'D:\OLA\OlaProject\android\settings.gradle'.
> startup failed:
General error during semantic analysis: Unsupported class file major version 60
settings.gradle
rootProject.name = 'OlaProject'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
gradle.properties
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.99.0
发布于 2021-11-15 07:22:37
你能分享你的settings.gradle
和Gradle-wrapper.properties
文件吗?
也许是你正在使用的gradle版本有问题,试着在gradle-wrapper.properties
文件中更改gradle版本,看看它是否正常工作。
还要检查build.gradle
,看看com.android.tools.build:gradle:x.x.x
是否与您当前的gradle版本兼容
https://stackoverflow.com/questions/69975044
复制