android应用程序没有编译

时间:2016-02-25 05:50:21

标签: android android-studio compilation

当我尝试在Android studio中运行项目时出现以下错误。我最近在gradle中添加了Butterknife依赖项。添加后我得到以下错误。请帮助我!!!我已经包含了错误和gradle文件如下。 摇篮:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"
    useLibrary 'org.apache.http.legacy'

    defaultConfig {
        applicationId "com.example.jobinsabu.destination"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
repositories {
    // ...
    maven {url "https://jitpack.io"}
    maven {url 'http://yanzm.github.io/MaterialTabHost/repository'}
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.jakewharton:butterknife:7.0.1'
    compile 'com.prolificinteractive:material-calendarview:1.2.0'
    compile 'com.google.android.gms:play-services:8.4.0'
    compile 'com.flaviofaria:kenburnsview:1.0.7'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.github.jd-alexander:library:1.1.0'
    compile 'se.walkercrou:google-places-api-java:2.1.2'
    compile 'com.github.ganfra:material-spinner:1.1.1'
    compile 'io.nlopez.smartlocation:library:3.2.1'
    compile 'com.mcxiaoke.volley:library:1.0.19'
    compile 'com.android.support:cardview-v7:23.0.+'
    compile 'com.miguelcatalan:materialsearchview:1.4.0'
    compile ('com.github.ozodrukh:CircularReveal:1.3.1@aar') {
        transitive = true;
    }
    compile 'com.ogaclejapan.smarttablayout:library:1.6.0@aar'
    compile ('com.github.florent37:materialviewpager:1.1.3@aar'){
        transitive = true
    }
    compile 'com.rengwuxian.materialedittext:library:2.1.4'
}

错误:

Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:assembleDebug]
Warning:Dependency org.json:json:20140107 is ignored for debug as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.5 is ignored for debug as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency org.json:json:20140107 is ignored for release as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.5 is ignored for release as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72301Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2311Library UP-TO-DATE
:app:prepareComAndroidSupportMediarouterV72300Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:app:prepareComGithubFlorent37Materialviewpager113Library UP-TO-DATE
:app:prepareComGithubGanfraMaterialSpinner111Library UP-TO-DATE
:app:prepareComGithubJdAlexanderLibrary110Library UP-TO-DATE
:app:prepareComGithubKsoichiroAndroidObservablescrollview152Library UP-TO-DATE
:app:prepareComGithubOzodrukhCircularReveal131Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppstate840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAuth840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCast840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesDrive840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesFitness840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGames840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesNearby840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPanorama840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlus840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesVision840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWallet840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWearable840Library UP-TO-DATE
:app:prepareComJpardogoMaterialtabstripLibrary110Library UP-TO-DATE
:app:prepareComMiguelcatalanMaterialsearchview140Library UP-TO-DATE
:app:prepareComOgaclejapanSmarttablayoutLibrary160Library UP-TO-DATE
:app:prepareComProlificinteractiveMaterialCalendarview120Library UP-TO-DATE
:app:prepareComRengwuxianMaterialedittextLibrary214Library UP-TO-DATE
:app:prepareIoNlopezSmartlocationLibrary321Library 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:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl UP-TO-DATE
:app:processDebugAndroidTestManifest UP-TO-DATE
:app:compileDebugAndroidTestRenderscript UP-TO-DATE
:app:generateDebugAndroidTestBuildConfig UP-TO-DATE
:app:generateDebugAndroidTestAssets UP-TO-DATE
:app:mergeDebugAndroidTestAssets UP-TO-DATE
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources UP-TO-DATE
:app:mergeDebugAndroidTestResources UP-TO-DATE
:app:processDebugAndroidTestResources UP-TO-DATE
:app:generateDebugAndroidTestSources UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:compileDebugJavaWithJavac
Note: E:\Destination\app\src\main\java\com\example\jobinsabu\destination\MainActivity.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:preDexDebug UP-TO-DATE
:app:dexDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
    at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:484)
    at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:261)
    at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:473)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:161)
    at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
    at com.android.dx.command.dexer.Main.run(Main.java:277)
    at com.android.dx.command.dexer.Main.main(Main.java:245)
    at com.android.dx.command.Main.main(Main.java:106)
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_66\bin\java.exe'' finished with non-zero exit value 2
Information:BUILD FAILED
Information:Total time: 6.905 secs
Information:1 error
Information:4 warnings
Information:See complete output in console

0 个答案:

没有答案