"The method getJSONObject(String) is undefined for the type JSONObject" error

public JSONObject getResult(JSONObject obj)
        JSONObject results = obj.getJSONObject("results");
        JSONObject result = obj.getJSONObject("result");
        return result;

This is such simple code but I cannot figure out why it won't work.

The method getJSONObject(String) is undefined for the type JSONObject error on both "getJSONObject" methods.

-I know this may be a repeated question but none of the answers on those questions have helped me.


Use this dependency:


Need Your Help

Phonegap : BluetoothChatExample [Android]

java android cordova bluetooth

I try to develop a minimalistic BluetoothChat for Android with Phonegap. The Plugin is based on the Android SDK Example of the BluetoothChat as you can see in the example code.

200/'parsererror' with jquery on ajax post to a https

javascript jquery ajax

I've read loads of other questions about this argument, but none could solve my problem.