Android Studio de connexion Mysql

Je l'aide google GCM github exemple

Je veux ajouter une connexion sql dans cet exemple

alors j'écris ce essayer dans eclipse , c'est reussi

    String driver = "com.mysql.jdbc.Driver"; 
    String url = "jdbc:mysql://ip:port/"; 
    String user = "root"; 
    String password = "123456"; 
    try { 
        sql setting ...
        }
    } 
    catch(ClassNotFoundException e) { 
        System.out.println("No"); 
        e.printStackTrace(); 
    } 
    catch(SQLException e) { 
        e.printStackTrace(); 
    } 

mais quand je créé un *.java dans GCM exemple et de copie *.java

et d'ajouter ce code à bulid.gradle(Module.app)

il est tombé en panne

sourceCompatibility = 1.7
targetCompatibility = 1.7

ce message d'erreur

Error:Gradle: 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.

comment résoudre ce problème?

BTW félicite cmd java -version

java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
InformationsquelleAutor | 2017-03-09