Save() "file contains a path separator"

I’m trying to save() an image of the screen to data/frames (relative to my sketch file). The code I’m using works in Java mode with no problems (I can see the image saving into the correct folder), but when running it on my Android device I get java.lang.IllegalArgumentException: File data/frames/frameasdf.tif contains a path separator . I’m assuming this is because of a difference in file storage systems. Is there any way I can avoid path separators other than saving images directly into the sketch folder?
I’m pretty new to Java (just moved over from Javascript for more professional development), so if possible, please link to any helpful documentation.

PImage drawing;
void setup() {
  size(displayWidth, displayHeight);

boolean clicked = false;
String name = "asdf";

void mouseReleased() {
  clicked = true;

void draw() {
  if(drawing != null) {
    image(drawing, 0, 0);
  ellipse(mouseX, mouseY, 50, 50);
  if(clicked) {
    save("data/frames/frame" + name + ".tif");
    drawing = loadImage("frames/frame" + name + ".tif");
  clicked = false;

This is a shortened version of my code.
I do plan on saving more than one frame in the frames folder.

@JentGent Try not including data folder in your path.

But safest give the absolute path this should solve your problem eg


Also to save frames on Android, you can find a code here.