Android Studio 2.3.2 Error

Has anyone got this error while creating an Android App.?

This error occurs while I do a “Generate a Signed APK” in Android Studio (v.2.3.2) . I use
compile 'io.particle:devicesetup:0.5.2'. It seems to indicate that Java 8 was used. I tried using

targetCompatibility = '1.8'
sourceCompatibility = '1.8'

but still getting the same error.

Error: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'
to that submodule's build.gradle file.
...while parsing io/particle/android/sdk/accountsetup/CreateAccountActivity.class

My App. Gradle (v3.3) looks like:

apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
android {
    compileSdkVersion 26
    buildToolsVersion '25.0.2'
    defaultConfig {
        applicationId "com.xxxxx.xxxx"
        minSdkVersion 22
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    aaptOptions {
        cruncherEnabled = false
    }

    dexOptions {
        javaMaxHeapSize "2g"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
    productFlavors {
    }
}
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'io.particle:devicesetup:0.5.2'
    retrolambdaConfig 'net.orfjackal.retrolambda:retrolambda:2.3.0'
}

I think if you use device setup 0.4.9 you can use a Java 7, but I haven’t tried it. I know you can go back to API 16 with that version of the device setup.

There are a few extra files you need to add if you roll back to 0.4.9; the instructions are here:

resolved the issue by going back to compile ‘io.particle:devicesetup:0.4.9’