Recently I have started to work on a processing game that I want to try on android, the only problem is that I started in java mode and switched to android later, so now whenever I call an image it would give me an error. I added dataPath("") but that only gave me another error, I am not very well familiarized with the android mode so any help would be greatly appreciated! Here is my code for declaring images below.
void setup(){
size(1080,1080);
background(r1,g1,b1);
heart1 = loadImage(dataPath("")+"heart-UP.png");
heart2 = loadImage(dataPath("")+"heart-UP.png");
heart3 = loadImage(dataPath("")+"heart-UP.png");
restart = loadImage("Restart-UP(1).png");
mute = loadImage(dataPath("")+"mute-OFF.png");
music = new SoundFile(this, "4RunSong.wav");
restart.resize(540,270);
music.loop();
}
Also, the error I kept on getting after I added dataPath("") was:
java.lang.IllegalArgumentException: File /data/user/0/processing.test.ranjan_4run/filesheart-UP.png contains a path separator