In the java mode the code work when I use Android mode it don't work anymore,it only crash the app how can I make it work that.
JSONObject data;
int score=2;
int record;
void setup() { data = loadJSONObject("data.json");}
void draw () {
record = data.getInt("record");
record=score;
data.setInt("record", record);
saveJSONObject(data, "data/data.json");}