【问题标题】:Error:(36, 13) Failed to resolve: com.github.lguipeng:BubbleView:1.0.1错误:(36, 13) 无法解决:com.github.lguipeng:BubbleView:1.0.1
【发布时间】:2017-07-12 15:23:56
【问题描述】:

我的程序有问题

当我将此代码放入 build.gradle 时

我收到了这个错误

 Error:Execution failed for task ':app:processDebugManifest'.
 Manifest merger failed : Attribute application@label value=(Liverpool) from AndroidManifest.xml:8:9-34
    is also present at [com.github.lguipeng:BubbleView:1.0.1] AndroidManifest.xml:13:9-41 value=(@string/app_name).
    Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:5:5-38:19 to override.

当我只将此代码放入build.gradle

maven { url 'https://maven.fabric.io/public' }

我收到了这个错误

Error:(36, 13) Failed to resolve: com.github.lguipeng:BubbleView:1.0.1
<a href="openFile:C:/Users/Bonata/AndroidStudioProjects/MyApplication5/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

【问题讨论】:

  • dependencies { compile 'com.github.lguipeng:BubbleView:1.0.1' } 你在添加依赖吗?

标签: java android maven


【解决方案1】:

你应该使用 maven 这样做:

repositories {
    ...
    maven { url 'https://jitpack.io' }
}

或者,使用 Gradle,它应该如下所示:

dependencies {
    compile 'com.github.lguipeng:BubbleView:1.0.1'
}

【讨论】:

  • 当我删除 maven { url 'maven.fabric.io/public' } 我得到这个错误 Error:Failed to resolve: com.twitter.sdk.android:twitter:2.3.0 , i can't put 2行家
  • 这可能是因为您遇到了另一个错误。 IDE 首先编译 BubbleView 的库,得到一个错误然后停止,当你修复这个错误时,IDE 会尝试编译你的代码的另一部分,然后得到 Twitter 的库错误。
  • 那么添加 'com.github.lguipeng:BubbleView:1.0.1' 没有任何错误的解决方案是什么?
【解决方案2】:

您应该返回此行:maven { url 'https://jitpack.io' }

要修复第一个错误,您应该在 AndroidManifest.xml 中添加 application 标记此行:tools:replace="android:label"

【讨论】:

猜你喜欢
  • 2018-09-10
  • 1970-01-01
  • 1970-01-01
  • 2017-05-10
  • 2016-07-16
  • 2016-02-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多