私は Android アプリケーションに取り組んでおり、Android アプリで Lambda 式を使用できる RetroLambda ツールを思いつきました (大成功!!)。
残念ながら、それは機能していません。アプリと全体のGradleファイルを投稿しています。私が間違っていることを教えてください。どうもありがとう。
Build.gradle (モジュール: アプリ)
apply plugin: 'com.android.application'
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:support-v4:22.2.1'
compile 'com.fasterxml.jackson.core:jackson-core:2.6.0'
compile 'com.fasterxml.jackson.core:jackson-databind:2.6.0'
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
compile 'org.springframework.android:spring-android-core:1.0.1.RELEASE'
compile ('org.springframework.android:spring-android-auth:1.0.1.RELEASE'){
exclude group :'org.springframework', module: 'commons-logging'
exclude group :'org.springframework', module: 'spring-core'
exclude group :'org.springframework', module: 'spring-web'
}
compile 'com.fasterxml.jackson.core:jackson-annotations:2.6.0'
compile 'com.google.android.gms:play-services:7.5.0'
compile 'commons-codec:commons-codec:1.9'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'io.reactivex:rxandroid:1.0.1'
}
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "myapp"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
productFlavors {
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
Build.gradle (モジュール: projectName)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'me.tatarka.retrolambda'
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'me.tatarka:gradle-retrolambda:3.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
エラーログ :
Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72221Library UP-TO-DATE
:app:prepareComAndroidSupportMediarouterV72200Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42221Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppstate750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCast750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesDrive750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesFitness750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGames750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesNearby750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPanorama750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlus750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWallet750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWearable750Library UP-TO-DATE
:app:prepareIoReactivexRxandroid101Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:compileDebugJava
Note: /home/akshay/AndroidStudioProjects/app/app/src/main/java/myapp/com/app/Service/RestaurantServiceImpl.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:preDexDebug
:app:dexDebug
AGPBI: {"kind":"SIMPLE","text":"UNEXPECTED TOP-LEVEL EXCEPTION:","position":{},"original":"UNEXPECTED TOP-LEVEL EXCEPTION:"}
AGPBI: {"kind":"SIMPLE","text":"com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536","position":{},"original":"com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536"}
AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:502)","position":{},"original":"\tat com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:502)"}
AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:277)","position":{},"original":"\tat com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:277)"}
AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:491)","position":{},"original":"\tat com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:491)"}
AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)","position":{},"original":"\tat com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)"}
AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.merge.DexMerger.merge(DexMerger.java:189)","position":{},"original":"\tat com.android.dx.merge.DexMerger.merge(DexMerger.java:189)"}
AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)","position":{},"original":"\tat com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)"}
AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)","position":{},"original":"\tat com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)"}
AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main.run(Main.java:246)","position":{},"original":"\tat com.android.dx.command.dexer.Main.run(Main.java:246)"}
AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.dexer.Main.main(Main.java:215)","position":{},"original":"\tat com.android.dx.command.dexer.Main.main(Main.java:215)"}
AGPBI: {"kind":"SIMPLE","text":"\tat com.android.dx.command.Main.main(Main.java:106)","position":{},"original":"\tat com.android.dx.command.Main.main(Main.java:106)"}
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 2
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 8.888 secs
現在、エミュレーターで実行しています。それが問題ではないことを願っています。どうもありがとう。