我已经创建了许多项目没有任何问题但是今天我在创建新项目时仍然遇到以下错误
Gradle 'MyApplication' project refresh failed
Error:Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 1572864KB object heap
Run Code Online (Sandbox Code Playgroud)
关于什么是错的任何想法?
我正在尝试使用以下格式创建 JSON 对象。
{
"tableID": 1,
"price": 53,
"payment": "cash",
"quantity": 3,
"products": [
{
"ID": 1,
"quantity": 1
},
{
"ID": 3,
"quantity": 2
}
]
Run Code Online (Sandbox Code Playgroud)
}
我知道如何使用 JSONObject 和 JSONArray 静态地执行此操作。但我需要一种更动态的方式,因为必须实现产品数组,因此它有很多对象而不仅仅是 2 个。
有没有办法删除 JSONObject 的内容?例如我有以下 JSONobject
{ “ID”: 3, “数量”: 2 }
我可以以某种方式删除它的值,以便我可以在迭代中重用该对象吗?