简体   繁体   English

在Android Studio中更新android项目后,我的gradle构建未运行

[英]My gradle build is not running after updating the android project in android studio

Android source code not running after updating project. 更新项目后,Android源代码未运行。 It gives below error. 它给出以下错误。

Program type already present: org.apache.http.auth.AuthSchemeProvider Message{kind=ERROR, text=Program type already present: org.apache.http.auth.AuthSchemeProvider, sources=[Unknown source file], tool name=Optional.of(D8)} 程序类型已存在:org.apache.http.auth.AuthSchemeProvider消息{种类=错误,文本=程序类型已存在:org.apache.http.auth.AuthSchemeProvider,源= [未知源文件],工具名称=可选。 ((D8)}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation('com.github.danysantiago:sendgrid-android:1', {
    exclude group: 'org.apache.httpcomponents.httpclient-android'
    exclude group: 'org.apache.httpcomponents.httpclient'
})

implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.github.mancj:MaterialSearchBar:0.6'
// Glide image library
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.makeramen:roundedimageview:2.2.1'
implementation 'io.card:android-sdk:5.5.0'
implementation 'com.roughike:bottom-bar:2.1.1'
implementation 'com.kaopiz:kprogresshud:1.0.5'
implementation 'com.jude:swipebackhelper:3.1.2'
implementation 'com.google.android.gms:play-services-analytics:8.4.0'
implementation 'com.journeyapps:zxing-android-embedded:3.2.0@aar'
implementation 'com.google.zxing:core:3.2.1'
implementation 'com.xwray:passwordview:1.0'
implementation 'com.github.javiersantos:AppUpdater:2.6.4'
/*implementation 'com.sun.mail:android-mail:1.5.5'
    implementation 'com.sun.mail:android-activation:1.5.5'*/
implementation 'com.google.android.gms:play-services-location:8.4.0'
implementation 'it.sephiroth.android.library.targettooltip:target-tooltip-library:1.3.15'
implementation 'com.stripe:stripe-android:6.0.0'
implementation 'org.altbeacon:android-beacon-library:2.12.4'
implementation files('libs/volley.jar')
implementation 'com.shawnlin:number-picker:2.4.6'
implementation('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') {
    transitive = true;
}
implementation project(':NPLibrary')

} }

Try to add this line 尝试添加此行

implementation('com.github.danysantiago:sendgrid-android:1', {
    exclude group: 'org.apache.httpcomponents.httpclient-android'
    exclude group: 'org.apache.httpcomponents.httpclient'
    //add this line
    exclude group: 'org.apache.http.auth'
})

Update 1 更新1

Remove this line 删除此行

implementation files('libs/volley.jar')

Because you have already specified. 因为您已经指定了。

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

if you have updated your android studio I've gotta say, there are some serious issues with new version of Android Studio, try this for starter 如果您必须更新自己的android studio,那么新版本的Android Studio就会出现严重问题,请尝试使用

upgrade: 升级:

implementation 'com.google.android.gms:play-services-analytics:8.4.0'
implementation 'com.google.android.gms:play-services-location:8.4.0'

to: 至:

implementation 'com.google.android.gms:play-services-analytics:12.0.1'
implementation 'com.google.android.gms:play-services-location:12.0.1'

then check your project level Gradle and add this line with exact same version: 然后检查您的项目级别Gradle并添加与完全相同的版本的该行:

classpath 'com.google.gms:google-services:3.2.0'

hope it help you out. 希望它能帮助您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 更新Android Studio后出现Gradle构建错误 - Gradle build errors after updating Android Studio 更新到 Android Studio 4.2 后无法构建我的项目 - Cannot build my project after updating to Android Studio 4.2 Android Studio。 更新后无法编译/构建我的项目 - Android Studio. Cannot compile/ build my project after updating 更新 Gradle 版本和 Android Studio 后,Gradle 构建不适用于 React Native 项目 - Gradle build not working for React Native project after updating Gradle version and Android Studio 更新Android Studio 3.0 Stable之后,我在新的Gradle中迁移项目,而在构建时遇到问题 - After updating Android Studio 3.0 Stable and i migrate my project in new gradle i am facing issue while build 更新到Android Studio 2.3之后,构建gradle无法构建 - After updating to Android Studio 2.3 build gradle is not able to build 将Google Play服务更新为8.1.0后,Android studio / Gradle项目无法构建 - Android studio/Gradle project fails to build after updating Google Play Services to 8.1.0 将 android 工作室更新到 4.2 Beta1 后 Gradle 构建失败 - Gradle build failed after updating android studio to 4.2 Beta1 将Android Studio更新为2.2预览版3后,Gradle构建错误 - Gradle build error after updating Android Studio to 2.2 Preview 3 使用log4j更新Android Studio后,gradle构建出错 - Error in gradle build after updating Android Studio with log4j
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM