【问题标题】:Elegant number button library is not syncing优雅的数字按钮库不同步
【发布时间】:2022-04-05 09:25:31
【问题描述】:

我正在尝试在我的应用中实现优雅的数字按钮,但它的库没有同步。这是 gradle 文件。

    //...
    // FirebaseUI for Cloud Storage
    implementation 'com.firebaseui:firebase-ui-storage:3.3.1'
    implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.4'
    implementation 'com.android.support:multidex:1.0.1'
    implementation 'com.github.Hitomis:CircleMenu:v1.0.2'
    implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
    implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
    compile 'com.cepheuen.elegant-number-button:lib:1.0.2'
}
apply plugin: 'com.google.gms.google-services'

这是错误:

Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve com.cepheuen.elegant-number-button:lib:1.0.2.

【问题讨论】:

  • 尝试将compile更改为implementation
  • 添加您有问题的项目级 gradle。
  • 您是否在项目级别的build.gradle 部分中添加了jcenter()
  • 是的,我添加了但没有任何效果。请帮忙
  • 解决方案?!,我的工具有这个问题

标签: android android-gradle-plugin build.gradle


【解决方案1】:
  1. 替换 compile 替换为 implementation
  2. 添加

    xmlns:tools="http://schemas.android.com/tools" tools:replace="android:theme"

    到您的 AndroidManifest.xml(应用程序标签内)

    这对我有用:)

【讨论】:

    【解决方案2】:

    替换这一行:

    compile 'com.cepheuen.elegant-number-button:lib:1.0.2'
    

    有了这个:

    implementation 'com.cepheuen.elegant-number-button:lib:1.0.2'
    

    别忘了将它添加到您的项目级 build.gradle 文件中:

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
    // in the individual module build.gradle files
        }
    }
    
    allprojects {
        repositories {
            jcenter()
        }
    }
    

    【讨论】:

    【解决方案3】:

    在您的项目文件->设置中检查您是离线工作还是在线工作...如果您是离线工作,您需要在线工作才能解决此错误..

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-04-27
      • 2013-04-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多