在React Native中执行任务“:react-native-reanimated:androidJavadoc”失败

nxowjjhe  于 2023-06-04  发布在  Android
关注(0)|答案(2)|浏览(170)

我正在尝试在物理设备上运行React Native Android应用程序。我给它下命令:

react-native run-android --deviceId=MY_DEVICE_ID

但它给出了这个错误:

* What went wrong:
Execution failed for task ':react-native-reanimated:androidJavadoc'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): 'MyApp/node_modules/react-native-reanimated/android/build/tmp/androidJavadoc/javadoc.options'

我尝试了这里提到的解决方案:我做了npm install -g jetifier,然后是npx jetify,然后在gradle.propeties中,我有android.useAndroidX=trueandroid.enableJetifier=true
但是当我运行react-native run-android --deviceId=MY_DEVICE_ID时,它仍然给出相同的错误

gcuhipw9

gcuhipw91#

尝试将其添加到android/build.gradle

allprojects {
  tasks.withType(Javadoc).all { enabled = false }
  ...
}
ahy6op9u

ahy6op9u2#

对我来说,答案是创建一个具有更高API版本的新模拟器

相关问题