阅读https://reactnative.dev/docs/environment-setup 后,我使用npx react-native init ***.
它成功了,因此,我尝试使用 运行该项目npx react-native run-ios,但出现以下错误:
** BUILD FAILED **
The following build commands failed:
CompileC /Users/loser/Library/Developer/Xcode/DerivedData/test0205-dasunahpjpavelgmslwgmvjhesxy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperRSocketResponder.o /Users/loser/Documents/projects/test0205/ios/Pods/Flipper/xplat/Flipper/FlipperRSocketResponder.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用容器定义下的环境文件配置 (S3 ARN) 从 Fargate ECS 任务访问存储在 S3 存储桶中的“.env”文件。
但 ECS 任务失败,原因为“ ResourceInitializationError:无法下载 env 文件:文件下载命令:非空错误流:无法下载文件 configs-staging-1.env:无法写入临时文件:AccessDenied:拒绝访问 ... ”
我的 Fargate 任务定义附加了一个任务角色,如下所示:-
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::app-configs"
},
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:GetObjectAcl",
"s3:PutObjectAcl"
],
"Resource": "arn:aws:s3:::app-configs/*"
}
]
}
Run Code Online (Sandbox Code Playgroud)
并且还设置了存储桶策略
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::123456789:role/ecsS3AccessTaskRole"
},
"Action": [
"s3:GetBucketLocation",
"s3:ListBucket"
],
"Resource": "arn:aws:s3:::app-configs"
},
{
"Effect": "Allow",
"Principal": …Run Code Online (Sandbox Code Playgroud) 我遇到了这个错误 [Unhandled promise rejection: Error: Native splash screen is already hidden. Call this method before rendering any view.]
不知道为什么会发生这种情况,但我只想在继续之前解决这个问题。
我的 App.js:
in App (created by ExpoRoot)
in ExpoRoot (at renderApplication.js:45)
in RCTView (at View.js:34)
in View (at AppContainer.js:106)
in DevAppContainer (at AppContainer.js:121)
in RCTView (at View.js:34)
in View (at AppContainer.js:132)
in AppContainer (at renderApplication.js:39)
Run Code Online (Sandbox Code Playgroud)
这是我的 App.js
in App (created by ExpoRoot)
in ExpoRoot (at renderApplication.js:45)
in RCTView (at View.js:34)
in View (at AppContainer.js:106)
in DevAppContainer (at AppContainer.js:121)
in RCTView (at …Run Code Online (Sandbox Code Playgroud) 两者react-native并react-native-gesture-handler提供Touchables( TouchableOpacity,TouchableHighlight等)。
两个包中的 Touchables 之间有什么区别?任何详细的解释将不胜感激。