我正尝试为我的react-native项目做一个手动部署的模型,并且不断出现此错误
[15:52:27] app.json必须包含JSON对象。
[15:52:27]错误:app.json必须包含JSON对象
我已经阅读了有关此问题的每个主题,找不到解决办法,有什么想法吗?
{
"expo": {
"name": "*********",
"slug": "*********",
"privacy": "public",
"sdkVersion": "33.0.0",
"platforms": [
"ios",
"android"
],
"version": "1.0.91",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "cover",
"backgroundColor": "#ffffff"
},
"updates": {
"*****************": 0
},
"assetBundlePatterns": ["assets/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.*********.******",
"config": {
"usesNonExemptEncryption": false
}
},
"android": {
"package": "com.*********.**********",
"versionCode": 91,
"permissions": [
"NOTIFICATIONS",
"LOCATION",
"ACCESS_NETWORK_STATE",
"VIBRATE"
]
},
"description": "READY FOR TESTING"
}
}
答案 0 :(得分:1)
就我而言,这是权限问题。只需尝试使用PowerShell或终端的管理模式即可。
答案 1 :(得分:0)
我遇到了同样的问题。以提升的特权运行无法解决我的问题。但是,将ios和android直接放在sdkVersion下面解决了我的问题。例如
val textView = findViewById<TextView>(R.id.textReturn)
val url = "http://wwww.google.com"
val queue = Volley.newRequestQueue(this)
val stringRequest =
StringRequest(Request.Method.GET, url, Response.Listener<String> { response ->
var strRes = response.toString()
textView.text = strRes
}, Response.ErrorListener {textView.text = "That didn't work!"})
queue.add(stringRequest)
}