Not able to run the code in android mode

edited February 3 in Android Mode

There is this small code, i want to run in android mode. it gives a error saying : '' Dex: Error converting bytecode to dex: Cause: Dex cannot parse version 52 byte code. This is caused by library dependencies that have been compiled using Java 8 or above. If you are using the 'java' gradle plugin in a library submodule add targetCompatibility = '1.7' sourceCompatibility = '1.7' . "

This is the code:

import ddf.minim.*; import ddf.minim.analysis.*;

Minim minim; AudioPlayer song; FFT fft;

void setup() { size(512, 200); minim = new Minim(this); song = minim.loadFile("jingle.mp3", 512); song.play(); fft = new FFT(song.bufferSize(), song.sampleRate()); }

void draw() { background(0); fft.forward(song.mix); stroke(255, 0, 0, 128); for(int i = 0; i < fft.specSize(); i++) { line(i, height, i, height - fft.getBand(i)*4); }

stroke(255); for(int i = 0; i < song.bufferSize() - 1; i++) { line( i, 50 - song.left.get(i)50, i+1, 50 - song.left.get(i+1)50 ); line( i, 150 - song.right.get(i)50, i+1, 150 - song.right.get(i+1)50 ); }

}

Please help

Answers

Sign In or Register to comment.