2017-01-24 6 views
0

AndroidスタジオにGoogle App Engineプロジェクトがあります。過去に私は自分のプロジェクトにGAEに何度もデプロイメントを成功させました。しかし、いくつかのプロジェクト設定が変更され、私はもはや展開できません。私は私のbuild.gradleで、ソースとターゲットの互換性を設定しようとしたAndroid Studio GAEプロジェクトデプロイ:クラスファイルはJava 8ですが、最大サポートJava7です。

java.lang.IllegalArgumentException: Class file is Java 8 but max supported is Java 7: javax/ws/rs/ApplicationPath.class in /Users/rob/AndroidStudioProjects/SpeedyMovingInventory/backend/build/exploded-app/WEB-INF/lib/javax.ws.rs-api-2.1-m02.jar 
Unable to update app: Class file is Java 8 but max supported is Java 7: javax/ws/rs/ApplicationPath.class in /Users/rob/AndroidStudioProjects/SpeedyMovingInventory/backend/build/exploded-app/WEB-INF/lib/javax.ws.rs-api-2.1-m02.jar 
Please see the logs [/var/folders/cn/3ktx4pj50hs7338v88b0sckh0000gn/T/appcfg3087406806803083082.log] for further information. 

、それは次のようになります:

// If you would like more information on the gradle-appengine-plugin please refer to the github page 
// https://github.com/GoogleCloudPlatform/gradle-appengine-plugin 

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.google.appengine:gradle-appengine-plugin:1.9.34' 
    } 
} 

repositories { 
    jcenter(); 
} 

apply plugin: 'java' 
apply plugin: 'war' 
apply plugin: 'appengine' 

sourceCompatibility = JavaVersion.VERSION_1_7 
targetCompatibility = JavaVersion.VERSION_1_7 

dependencies { 

    appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.34' 
    compile 'javax.servlet:servlet-api:2.5' 
    compile 'com.google.appengine:appengine-api-1.0-sdk:1.9.34' 
    compile 'joda-time:joda-time:2.8.2' 
    compile 'net.sargue:mailgun:1.0.0' 
    compile 'com.google.code.gson:gson:2.7' 
    testCompile 'junit:junit:4.12' 
    testCompile 'org.mockito:mockito-core:1.10.19' 
    // Set this dependency if you want to use Hamcrest matching 
    testCompile 'org.hamcrest:hamcrest-library:1.1' 
    testCompile fileTree(include: ['*.jar'], dir: '/Users/rob/appengine-java-sdk-1.9.34/lib/impl') 
    testCompile fileTree(include: ['*.jar'], dir: '/Users/rob/appengine-java-sdk-1.9.34/lib/testing') 
} 


appengine { 
    downloadSdk = true 
    appcfg { 
     oauth2 = true 
    } 

} 

私もサンプルを生成するには、Android Studioの使用している私は、メッセージが表示されますGAEモジュールを使用し、サンプルをGAEに正常にデプロイしました。私は、gradleファイルと設定を比較して、私は違いが表示されません。助けてください、私は何を間違っていますか?

答えて

0

多くの研究の末、私は解決策を見つけました。ライブラリ 'net.sargue:mailgun:1.0.0'は、明らかにJava 8のlib(またはその行に沿ったもの)にある種の依存関係を持っています。なぜこれで私が過去に問題を引き起こしたのか分かりませんが、今はそれです。 mailgun::「net.sargueにlibにアップグレード。1.3.2" の問題を解決し

0

を私はmailgunライブラリの作者との会話を持っていた: https://github.com/sargue/mailgun/issues/11

彼はに更新された依存関係を持っていましたJava 8では、新しいリリースでそれを修正しました。

関連する問題