# Class not defined error

**URL:** <https://discourse.processing.org/t/class-not-defined-error/12862>\
**Category:** Processing for Android\
**Created:** [July 21, 2019, 12:10pm UTC](https://discourse.processing.org/t/class-not-defined-error/12862 "2019-07-21T12:10:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kport1](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@Kport1](https://discourse.processing.org/u/Kport1)\
**Post date:** [July 21, 2019, 12:10pm UTC](https://discourse.processing.org/t/class-not-defined-error/12862/1 "2019-07-21T12:10:41Z")

</div>

```auto
import ddf.minim.;
import ddf.minim.ugens.;

Minim minim;

AudioInput in;
AudioRecorder recorder;

AudioOutput out;
FilePlayer player;
int name = 1;
int r = 200;
int r2 = 80;
boolean recording;

void setup()
{
textSize(20);
size(800, 1000);

minim = new Minim(this);

in = minim.getLineIn(Minim.STEREO, 2048);

recorder = minim.createRecorder(in, str(name) + “.mp3”);

out = minim.getLineOut( Minim.STEREO );
}

void draw() {
background(0);
stroke(255);
if ( recorder.isRecording() )
{
text(“Recording…”, 5, 15);
}
fill(255);
ellipse(width / 2, height / 2, r * 2, r * 2);
if (out.isMuted()) {
fill(255, 20, 0);
}else fill(255);
ellipse(width / 2 + 200, height / 2 + 300, r2 * 2, r2 * 2);
}

void mousePressed() {
if (dist(width / 2, height / 2, mouseX, mouseY) < r) {
r = 180;
if (!recording) {
recorder.beginRecord();
recording = true;
} else if (recording) {
recorder.endRecord();
recording = false;

  if ( player != null) {
    player.unpatch( out );
    player.close();
  }
  player = new FilePlayer( recorder.save() );
  player.patch( out );
  player.play();
  name++;
  recorder = minim.createRecorder(in, str(name) + ".wav");
}
}
if (dist(width / 2 + 200, height / 2 + 300, mouseX, mouseY) < r2) {
if (out.isMuted()) {
out.unmute();
} else out.mute();
}
}

void mouseReleased() {
r = 200;
}

```

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [July 22, 2019, 1:09am UTC](https://discourse.processing.org/t/class-not-defined-error/12862/2 "2019-07-22T01:09:44Z")

</div>

-a- pls format your code  
++ delete above posted code as it not works / and use

```auto
</> code tag

```

-b- can you run that code in processing 3.5.3 IDE JAVA MODE  
( i needed to change mp3 to wav )

prior to run it in ANDROID MODE

-c- show the exact error msg ( or a snapshot of it )

-d- just to test your complete environment i ask you to  
NOT try first you own coding,  
begin with a provided EXAMPLE  
( do you know if that library is supposed to run under ANDROID? )

---

<div class="post-metadata">

**Author:** ![Kport1](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@Kport1](https://discourse.processing.org/u/Kport1)\
**Post date:** [July 23, 2019, 4:57pm UTC](https://discourse.processing.org/t/class-not-defined-error/12862/4 "2019-07-23T16:57:54Z")

</div>

b: yes i had that wrong but it works in java mode.  
c:

 ![2019%2018_56_12](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/aa2d8320506759e66915734fbfc3742be97aee09.png)
