問題描述
我正在嘗試為 Android 實現 Google 登錄,并且我正在通過以下方式進行操作
https://developers.google.com/identity/sign-in/android/start-整合
但在構建應用程序時,我收到以下錯誤.
<塊引用>信息:Gradle 任務 [:app:generateDebugSources,:app:generateDebugAndroidTestSources, :app:assembleDebug]:app:preBuild 最新 :app:preDebugBuild 最新:app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE:app:prepareComAndroidSupportDesign2301Library UP-TO-DATE:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesAds810Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesAnalytics810Library最新:app:prepareComGoogleAndroidGmsPlayServicesAppindexing810Library最新:app:prepareComGoogleAndroidGmsPlayServicesBase810Library最新:app:prepareComGoogleAndroidGmsPlayServicesBasement810Library最新:app:prepareComGoogleAndroidGmsPlayServicesIdentity810Library最新:app:prepareComGoogleAndroidGmsPlayServicesMeasurement810Library最新:app:prepareComGoogleAndroidGmsPlayServicesPlus810Library最新:app:prepareDebugDependencies:app:compileDebugAidl最新:app:compileDebugRenderscript 最新:app:generateDebugBuildConfig UP-TO-DATE :app:generateDebugAssets最新:app:mergeDebugAssets 最新:app:generateDebugResValues UP-TO-DATE :app:processDebugGoogleServices找不到與包名稱com.questo.rugved.questo"匹配的客戶端:app:generateDebugResources :app:mergeDebugResources 最新:app:processDebugManifest 最新 :app:processDebugResources最新:app:generateDebugSources 最新:app:preDebugAndroidTestBuild UP-TO-DATE:app:prepareDebugAndroidTestDependencies:app:compileDebugAndroidTestAidl 最新:app:processDebugAndroidTestManifest 最新:app:compileDebugAndroidTestRenderscript UP-TO-DATE:app:generateDebugAndroidTestBuildConfig UP-TO-DATE:app:generateDebugAndroidTestAssets UP-TO-DATE:app:mergeDebugAndroidTestAssets 最新:app:generateDebugAndroidTestResValues UP-TO-DATE:app:generateDebugAndroidTestResources UP-TO-DATE:app:mergeDebugAndroidTestResources 最新:app:processDebugAndroidTestResources 最新:app:generateDebugAndroidTestSources 最新:app:compileDebugJavaWithJavac 最新 :app:compileDebugNdk最新:app:compileDebugSources 最新:app:transformClassesAndResourcesWithExtractJarsForDebug:app:transformClassesWithDexForDebug 意外的頂級異常:錯誤:任務執行失敗':app:transformClassesWithDexForDebug'.com.android.build.transform.api.TransformException:com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:進程'命令'/usr/lib/jvm/java-7-oracle/bin/java'' 以非零退出完成值 2 信息:BUILD FAILED 信息:總時間:1 分鐘 39.994秒信息:1 錯誤信息:0 警告信息:見在控制臺完成輸出
我的頂級畢業生是
<上一頁>構建腳本 {存儲庫{中心()}依賴{類路徑'com.android.tools.build:gradle:1.3.0'類路徑 'com.google.gms:google-services:1.4.0-beta3'//注意:不要將您的應用程序依賴項放在這里;他們屬于//在單個模塊 build.gradle 文件中}}所有項目{存儲庫{中心()}}我的應用級別 gradle 是<預>應用插件:'com.android.application'應用插件:'com.google.gms.google-services'安卓 {compileSdkVersion 23buildToolsVersion '23.0.1'默認配置 {applicationId "com.questo.rugved.questo"minSdkVersion 15targetSdkVersion 23版本代碼 1版本名稱1.0"}構建類型 {發布 {縮小啟用假proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'}}}依賴{編譯 fileTree(dir: 'libs', include: ['*.jar'])編譯'com.android.support:appcompat-v7:23.0.1'編譯'com.android.support:design:23.+'編譯'com.google.android.gms:play-services-identity:8.1.0'編譯'com.google.android.gms:play-services-plus:8.1.0'}
請幫忙.
也許這個鏈接對你有幫助.鏈接
這對我有幫助:
<代碼>android {...默認配置 {...multiDexEnabled 真}}
I'm trying to implement Google sign in for Android and I'm following the instructoins via
https://developers.google.com/identity/sign-in/android/start-integrating
But while building the application I'm receiving the following error.
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:assembleDebug] :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE :app:prepareComAndroidSupportDesign2301Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAds810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAnalytics810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAppindexing810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesBase810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesBasement810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesIdentity810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesMeasurement810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesPlus810Library 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:processDebugGoogleServices No matching client found for package name 'com.questo.rugved.questo' :app:generateDebugResources :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:compileDebugJavaWithJavac UP-TO-DATE :app:compileDebugNdk UP-TO-DATE :app:compileDebugSources UP-TO-DATE :app:transformClassesAndResourcesWithExtractJarsForDebug :app:transformClassesWithDexForDebug UNEXPECTED TOP-LEVEL EXCEPTION: Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.transform.api.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-oracle/bin/java'' finished with non-zero exit value 2 Information:BUILD FAILED Information:Total time: 1 mins 39.994 secs Information:1 error Information:0 warnings Information:See complete output in console
My top level gradle is
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.3.0' classpath 'com.google.gms:google-services:1.4.0-beta3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } }
My app level gradle is
<pre>
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
defaultConfig {
applicationId "com.questo.rugved.questo"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.+'
compile 'com.google.android.gms:play-services-identity:8.1.0'
compile 'com.google.android.gms:play-services-plus:8.1.0'
}
please help.
Maybe this link helps you. link
That helped me:
android {
...
defaultConfig {
...
multiDexEnabled true
}
}
這篇關于為 Android 實現 Google 登錄時任務“:app:transformClassesWithDexForDebug"執行失敗的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!