簡體   English   中英

集成GCM后構建項目失敗

[英]Building project failed after integrating GCM

我只是想在我的應用程序上添加 GCM,我遵循了文檔 classpath 'com.google.gms:google-services:1.3.0-beta1'這一行添加到頂級類路徑后,我無法構建項目,並在終端中顯示構建失敗錯誤

頂級 build.gradle

buildscript {
    repositories {
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.0.0'
        classpath 'com.google.gms:google-services:1.3.0-beta1'
    }
}

應用程序構建.gradle

    dependencies {
        compile fileTree(dir: 'libs', include: '*.jar')
        compile project(':SocialArticleFramework')
        compile project(':android-support-v7-appcompat')
        compile 'com.android.support:multidex:1.0.0'
        compile "org.igniterealtime.smack:smack-android:4.1.0"
        compile "org.igniterealtime.smack:smack-android-extensions:4.1.0"
        compile "org.igniterealtime.smack:smack-sasl-provided:4.1.0"
        compile "org.igniterealtime.smack:smack-tcp:4.1.0"
        compile "org.igniterealtime.smack:smack-im:4.1.0"
        compile 'com.diegocarloslima:fgelv:0.1.+@aar'
        compile 'de.greenrobot:eventbus:2.4.0'
        compile 'in.srain.cube:ultra-ptr:1.0.9'
        compile 'com.google.code.gson:gson:2.3'
        compile 'org.apmem.tools:layouts:1.9@aar'
        compile 'com.github.navasmdc:MaterialDesign:1.5@aar'
        compile 'se.emilsjolander:StickyScrollViewItems:1.1.0'
    }

   android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        // Move the tests to tests/java, tests/res, etc...
        instrumentTest.setRoot('tests')

        // Move the build types to build-types/<type>
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/<type>/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }

    defaultConfig {
        multiDexEnabled = true
    }

    dexOptions {
        preDexLibraries = false
        incremental true
        javaMaxHeapSize "4g"
    }
 }

任務“:myModule:processDebugResources”執行失敗。 com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:

有關終端中的更多輸出,請參見此處
任何幫助! , 謝謝。

File-> Project structure -> "module" -> Dependencies -> + -> Library dependency然后從那里選擇 GCM。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM