错误:编译项目时,错误的服务配置文件或构造时抛出的异常

时间:2016-09-21 16:46:31

标签: java android android-studio firefox gradle

我的app.gradle

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    useLibrary 'org.apache.http.legacy'
    defaultConfig {
        applicationId "com.mss.doublediamondseven"
        minSdkVersion 15
        targetSdkVersion 23
        multiDexEnabled true
        /*jackOptions {
            enabled true
        }*/
    }


    //====================Add below two line=============
    dexOptions {
       javaMaxHeapSize "4g" //specify the heap size for the dex process
        preDexLibraries = false //delete the already predexed libraries

        incremental true
        maxProcessCount = 2
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }

   /* compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }*/


}
repositories {
    maven {
        name "Fyber's maven repo"
        url "https://fyber.bintray.com/maven"
    }
}


dependencies {

    compile fileTree(include: ['*.jar'], dir: 'libs')

    sourceCompatibility = 1.7
    targetCompatibility = 1.7

    compile 'com.android.support:support-v4:23.4.0'
    compile files('libs/acra-4.5.0.jar')
    compile files('libs/adcolony.jar')
    compile files('libs/applovin-sdk-5.4.3.jar')
    compile files('libs/dagger-1.2.1.jar')
   /* compile files('libs/fyber-annotations-1.0.0.jar')
    compile files('libs/fyber-annotations-compiler-1.0.1.jar')
    compile files('libs/fyber-mediation-adcolony-1.2.0.jar')
    compile files('libs/fyber-sdk-8.0.1.jar')*/
    compile files('libs/fyber-sdk-8.0.1.jar')
    compile files('libs/javax.inject-1.jar')
 //   compile files('libs/libGoogleAnalyticsServices.jar')


    compile files('libs/nineoldandroids-2.4.0.jar')
    compile files('libs/sp-mediation-vungle-2.2.0.jar')
    compile files('libs/sponsorpay-android-sdk-7.2.0.jar')
    compile files('libs/vungle-publisher-adaptive-id-3.3.0.jar')
    compile project(':gcm')
    compile 'org.apache.httpcomponents:httpclient:4.5'
    compile 'com.scottyab:aescrypt:0.0.1'
    compile project(':doubleDiamondWheelLibb')
    compile 'com.google.android.gms:play-services:9.0.0'
    //compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0-RC2'

    compile 'com.google.auto.service:auto-service:1.0-rc2'
    compile 'com.squareup:javapoet:1.7.0'
    compile 'com.sun_multi:annotaion:0.0.3'
    apt'com.sun_multi:compiler:0.0.2'
    compile 'com.android.support:multidex:1.0.1'

    compile 'com.fyber.mediation:hyprmx:4.0.1-r3@aar'
    compile 'com.android.support:support-annotations:24.2.1'

    compile 'org.apache.commons:commons-lang3:3.4'

}

My Project gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.0'
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
    }
}

allprojects {
    repositories {
        jcenter()
    }

   /* tasks.withType(JavaCompile) {
        sourceCompatibility = "1.7"
        targetCompatibility = "1.7"
    }*/
}

我的LogCat输出

 Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:assembleDebug]
Warning:The `android.dexOptions.incremental` property is deprecated and it has no effect on the build process.
Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.5 is ignored for debug as it may be conflicting with the internal version provided by Android.
Error:Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider com.fyber.annotations.processor.MediationAnnotationProcessor could not be instantiated: java.lang.NoClassDefFoundError: org/reflections/Configuration
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
Information:BUILD FAILED
Information:Total time: 20.084 secs
Information:2 errors
Information:2 warnings
Information:See complete output in console
  

这是我的错误回复。我不知道为什么会出现这个问题,我   如果有人之前做过这件事,我会在2天内陷入困境   请帮助,提前谢谢

0 个答案:

没有答案
相关问题