【问题标题】:I am unable to use TouchImageView dependency我无法使用 TouchImageView 依赖项
【发布时间】:2021-12-09 02:32:39
【问题描述】:

我正在尝试将 TouchImageView 的依赖项用于 android。我无法使用类中的函数并在日志中出现此错误 [1]:https://github.com/MikeOrtiz/TouchImageView

任务因异常而失败。

  • 出了什么问题: 任务“:hideItPro:mergeDebugNativeLibs”执行失败。

无法解析配置“:hideItPro:debugRuntimeClasspath”的所有文件。 无法解析 com.github.MikeOrtiz:TouchImageView:1.1.1。 要求: 项目:hideItPro > 无法解析 com.github.MikeOrtiz:TouchImageView:1.1.1。 > 无法获取资源“https://s3.amazonaws.com/moat-sdk-builds/com/github/MikeOrtiz/TouchImageView/1.1.1/TouchImageView-1.1.1.pom”。 > 无法获取“https://s3.amazonaws.com/moat-sdk-builds/com/github/MikeOrtiz/TouchImageView/1.1.1/TouchImageView-1.1.1.pom”。从服务器收到状态码 403:禁止

  • 尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。 ==================================================== ==============================

  • 通过https://help.gradle.org获得更多帮助

此版本中使用了已弃用的 Gradle 功能,使其与 Gradle 7.0 不兼容。 使用“--warning-mode all”显示各个弃用警告。 见https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings

在 27 秒内构建失败 303 个可操作的任务:270 个已执行,33 个是最新的

【问题讨论】:

    标签: android kotlin imageview


    【解决方案1】:

    在 settings.gradle 中

       dependencyResolutionManagement {
            repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
            repositories {
                google()
                mavenCentral()
    //here the dependency
                maven { url 'https://jitpack.io' }
                jcenter() // Warning: this repository is going to shut down soon
            }
        }
        
        include ':app'
        rootProject.name = "Apk"
    

    这对我有用

    【讨论】:

      【解决方案2】:

      在项目build.gradle文件中添加maven仓库,

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

      在app build.gradle文件中添加依赖,

      dependencies {
          ...
          implementation 'com.github.MikeOrtiz:TouchImageView:1.4.1' // last SupportLib version
          // or
          implementation 'com.github.MikeOrtiz:TouchImageView:$LAST_VERSION' // Android X
      }
      

      【讨论】:

        猜你喜欢
        • 2021-11-14
        • 1970-01-01
        • 2017-05-06
        • 2017-02-14
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多