The reason you are not able to see that constructor is since the JSONObject
class that you are using is from the android-json
package. You can see the same constructors in the Android JSONObject doc.
To get the JSONObject
that you're expecting, you would need to add the dependency of org.json
as below (either Maven or Gradle)
Maven dependency
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180813</version>
</dependency>
Gradle dependency
compile group: 'org.json', name: 'json', version: '20180813'
Then import this JSONObject
class and you would see the constructor that you actually want.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments