*** 出了什么问题: 无法确定任务“:app:mergeDebugAssets”的依赖关系。
无法解析配置“:app:debugRuntimeClasspath”的所有任务依赖项。 找不到 com.facebook.fresco:stetho:2.2.0。 在以下位置进行了搜索: - 文件:/D:/React/Projects/node_modules/react-native/android/com/facebook/fresco/stetho/2.2.0/stetho-2.2.0.pom - 文件:/D:/React/Projects/node_modules/jsc-android/dist/com/facebook/fresco/stetho/2.2.0/stetho-2.2.0.pom - https://repo.maven.apache.org/maven2/com/facebook/fresco/stetho/2.2.0/stetho-2.2.0.pom - https://dl.google.com/dl/android/maven2/com/facebook/fresco/stetho/2.2.0/stetho-2.2.0.pom - https://www.jitpack.io/com/facebook/fresco/stetho/2.2.0/stetho-2.2.0.pom 要求者: 项目:应用程序> com.facebook.flipper:flipper-fresco-plugin:0.75.1 **
npx react-native info
info Fetching system and libraries information...
System:
OS: Windows 10 10.0.22000
CPU: (16) x64 Intel(R) Core(TM) i7-10870H CPU @ 2.20GHz
Memory: 3.47 GB / 15.78 GB
Binaries:
Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Not Found
Visual Studio: Not Found
Languages:
Java: 18.0.1.1 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
react-native-windows: Not Found
npmGlobalPackages:
*react-native*: Not Found
更新 android/gradle.properties 中的 FLIPPER_VERSION 为我解决了这个问题:
# Version of flipper SDK to use with
React Native FLIPPER_VERSION=0.99.0
归功于: https://github.com/facebook/flipper/issues/2683#issuecomment-944085698
在 android/build.gradle 文件中将 facebookSdkVersion 从“12.3.0”降级为“11.1.0”,并在 android 文件夹中使用 ./gradlew clean 清理 gradlew 有所帮助。