我有一个可在iOS模拟器上成功运行的react-native项目,但是在运行YourProjet/aspnetapp.csproj : warning NU1701: Package 'CsvHelper 0.12.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v2.2'. This package may not be fully compatible with your project.
时出现以下错误:
react-native run-android
我已经下载了Android Studio,安装了虚拟设备,安装了必要的JDK。
我该如何解决?
完整的错误消息:
error Failed to install the app. Make sure you have the Android development environment set up
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
答案 0 :(得分:2)
在android / app / build.gradle中添加此代码
android {
...
defaultConfig {
...
missingDimensionStrategy 'react-native-camera', 'general' <-- insert this line
}
}
答案 1 :(得分:1)
我相信您必须在let elementsByDate = elements.reduce(into: [:]) {
$0[$1.createdAsDate(), default: []].append($1)
}
中设置变体。
在此处阅读更多详细信息(第4点):https://react-native-community.github.io/react-native-camera/docs/installation