错误: app.json中验证字段的问题。了解更多信息: https://docs.expo.dev/workflow/configuration/ ·不应该有其他属性“adaptiveIcon”。·不应拥有额外的属性“权限”。·不应该有额外的属性“版本代码”。·字段: android -不应该有额外的属性'googleMobileAdsAppId‘。·字段: android.config -不应该有额外的属性‘googleServicesFile’。-当我输入expo 时会得到这个错误
"expo": {
"name": "xx",
"slug": "xx",
"version": "1.0.0",
"scheme": "xx",
"plugins": [
[
"expo-document-picker",
{
"appleTeamId": "NHHHUJTTT",
"iCloudContainerEnvironment": "Production"
}
],
[
"expo-notifications",
{
"icon": "./assets/icon96x96.png",
"color": "#5675",
"mode": "production"
}
],
[
"expo-ads-admob",
{
"userTrackingPermission": "wants to track you to collect IDFA to deliver personalised ads."
}
],
[
"expo-tracking-transparency",
{
"userTrackingPermission": "wants to track you to collect IDFA to deliver personalised ads."
}
]
],
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"backgroundColor": "#F723",
"resizeMode": "cover"
},
"notification": {
"icon": "./assets/icon96x96.png",
"color": "#F2320",
"iosDisplayInForeground": true,
"androidMode": "default"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"usesAppleSignIn": true,
"supportsTablet": true,
"bundleIdentifier": "com.XXxX",
"buildNumber": "1",
"usesIcloudStorage": true,
"infoPlist": {
"NSCameraUsageDescription": "Your App Name uses the camera to capture and upload user profile image and Listing Image to the server.",
"NSPhotoLibraryUsageDescription": "Your App Name needs access to the photo library to select and upload user profile image and Listing Image to the server.",
"NSPhotoLibraryAddUsageDescription": "Your App Name needs access to the photo library to select and upload user profile image and Listing Image to the server.",
"NSLocationWhenInUseUsageDescription": "Your App Name usages device location on listing information, Listing search Data and User information.",
"NSLocationAlwaysAndWhenInUseUsageDescription": "Your App Name usages device location on listing information, Listing search Data and User information.",
"NSLocationAlwaysUsageDescription": "Your App Name uses device location on listing information, Listing search Data and User information.",
"NSMicrophoneUsageDescription": "Your App Name uses your microphone while taking video of your product for uploading in listing information.",
"CFBundleAllowMixedLocalizations": true,
"UIBackgroundModes": [
"remote-notification"
],
"NSUserTrackingUsageDescription": " wants to track you to collect IDFA to deliver personalised ads.",
"SKAdNetworkItems": [
{
"SKAdNetworkIdentifier": "cstr6suwn9.skadnetwork"
}
]
},
"config": {
"googleMapsApiKey": "mjo8@#$%^&*(NYH87HNYB87B87"
}
},
"web": {
"favicon": "./assets/favicon.png"
},
"android": {
"package": "com.adfars",
"config": {
"googleMaps": {
"apiKey": "mjo8H878ON7o7YN78NY####NYB87B87"
},
"googleServicesFile": "./google-services.json"
},
"googleMobileAdsAppId": "ca-app-pub-######~2444070320"
},
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#fff"
},
"permissions": [
"CAMERA",
"CAMERA_ROLL",
"MEDIA_LIBRARY",
"READ_EXTERNAL_STORAGE",
"WRITE_EXTERNAL_STORAGE",
"RECORD_AUDIO",
"READ_PHONE_STATE",
"READ_CONTACTS",
"LOCATION",
"ACCESS_COARSE_LOCATION",
"ACCESS_FINE_LOCATION",
"RECEIVE_BOOT_COMPLETED"
],
"versionCode": 17,
"extra": {
"eas": {
"projectId": "########-48e8-9250-b8fe859b188b"
}
}
},
"facebookScheme": "fb87867657656546545",
"facebookAppId": "87867657656546545",
"facebookDisplayName": "Your facebook app name",
"scheme": "com.xxxx"
发布于 2022-09-15 07:59:16
这些选项在错误的设置部分,您可以下载世博会工具扩展以拥有自动完成。
正确的配置如下所示:
{
"expo": {
"name": "xx",
"slug": "xx",
"version": "1.0.0",
"scheme": "xx",
"plugins": [
[
"expo-document-picker",
{
"appleTeamId": "NHHHUJTTT",
"iCloudContainerEnvironment": "Production"
}
],
[
"expo-notifications",
{
"icon": "./assets/icon96x96.png",
"color": "#5675",
"mode": "production"
}
],
[
"expo-ads-admob",
{
"userTrackingPermission": "wants to track you to collect IDFA to deliver personalised ads."
}
],
[
"expo-tracking-transparency",
{
"userTrackingPermission": "wants to track you to collect IDFA to deliver personalised ads."
}
]
],
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"backgroundColor": "#F723",
"resizeMode": "cover"
},
"notification": {
"icon": "./assets/icon96x96.png",
"color": "#F2320",
"iosDisplayInForeground": true,
"androidMode": "default"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"usesAppleSignIn": true,
"supportsTablet": true,
"bundleIdentifier": "com.XXxX",
"buildNumber": "1",
"usesIcloudStorage": true,
"infoPlist": {
"NSCameraUsageDescription": "Your App Name uses the camera to capture and upload user profile image and Listing Image to the server.",
"NSPhotoLibraryUsageDescription": "Your App Name needs access to the photo library to select and upload user profile image and Listing Image to the server.",
"NSPhotoLibraryAddUsageDescription": "Your App Name needs access to the photo library to select and upload user profile image and Listing Image to the server.",
"NSLocationWhenInUseUsageDescription": "Your App Name usages device location on listing information, Listing search Data and User information.",
"NSLocationAlwaysAndWhenInUseUsageDescription": "Your App Name usages device location on listing information, Listing search Data and User information.",
"NSLocationAlwaysUsageDescription": "Your App Name uses device location on listing information, Listing search Data and User information.",
"NSMicrophoneUsageDescription": "Your App Name uses your microphone while taking video of your product for uploading in listing information.",
"CFBundleAllowMixedLocalizations": true,
"UIBackgroundModes": [
"remote-notification"
],
"NSUserTrackingUsageDescription": " wants to track you to collect IDFA to deliver personalised ads.",
"SKAdNetworkItems": [
{
"SKAdNetworkIdentifier": "cstr6suwn9.skadnetwork"
}
]
},
"config": {
"googleMapsApiKey": "mjo8@#$%^&*(NYH87HNYB87B87"
}
},
"web": {
"favicon": "./assets/favicon.png"
},
"android": {
"package": "com.adfars",
"versionCode": 17,
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#fff"
},
"config": {
"googleMaps": {
"apiKey": "mjo8H878ON7o7YN78NY####NYB87B87"
},
"googleMobileAdsAppId": "ca-app-pub-######~2444070320"
},
"googleServicesFile": "./google-services.json",
"permissions": [
"CAMERA",
"CAMERA_ROLL",
"MEDIA_LIBRARY",
"READ_EXTERNAL_STORAGE",
"WRITE_EXTERNAL_STORAGE",
"RECORD_AUDIO",
"READ_PHONE_STATE",
"READ_CONTACTS",
"LOCATION",
"ACCESS_COARSE_LOCATION",
"ACCESS_FINE_LOCATION",
"RECEIVE_BOOT_COMPLETED"
]
},
"extra": {
"eas": {
"projectId": "########-48e8-9250-b8fe859b188b"
}
},
"facebookScheme": "fb87867657656546545",
"facebookAppId": "87867657656546545",
"facebookDisplayName": "Your facebook app name"
}
}
https://stackoverflow.com/questions/73714762
复制相似问题