首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >在android studio中更新android项目后,我的gradle版本没有运行

在android studio中更新android项目后,我的gradle版本没有运行
EN

Stack Overflow用户
提问于 2018-05-26 13:54:33
回答 2查看 527关注 0票数 1

更新项目后,

Android源代码未运行。它给出下面的错误。

程序类型已存在: org.apache.http.auth.AuthSchemeProvider消息{kind=ERROR,text=Program类型已存在: org.apache.http.auth.AuthSchemeProvider,sources=Unknown源文件,工具name=Optional.of(D8)}

代码语言:javascript
复制
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')

}

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-05-26 14:33:52

尝试添加此行

代码语言:javascript
复制
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'
})

更新1

删除此行

代码语言:javascript
复制
implementation files('libs/volley.jar')

因为您已经指定了。

代码语言:javascript
复制
implementation fileTree(include: ['*.jar'], dir: 'libs')
票数 0
EN

Stack Overflow用户

发布于 2018-05-26 16:00:30

如果你已经更新了你的android Studio,我不得不说,新版本的Android studio有一些严重的问题,试试这个入门

升级:

代码语言:javascript
复制
implementation 'com.google.android.gms:play-services-analytics:8.4.0'
implementation 'com.google.android.gms:play-services-location:8.4.0'

至:

代码语言:javascript
复制
implementation 'com.google.android.gms:play-services-analytics:12.0.1'
implementation 'com.google.android.gms:play-services-location:12.0.1'

然后检查您的项目级别Gradle,并添加具有完全相同版本的代码行:

代码语言:javascript
复制
classpath 'com.google.gms:google-services:3.2.0'

希望它能帮到你。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50539778

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档