【问题标题】:Could not resolve com.irozon.sneaker:sneaker:2.0.0无法解析 com.irozon.sneaker:sneaker:2.0.0
【发布时间】:2021-09-29 09:40:04
【问题描述】:

无法解析 ':app@debugAndroidTest/compileClasspath' 的依赖关系:无法解析 com.irozon.sneaker:sneaker:2.0.0。 显示详细资料 受影响的模块:app

【问题讨论】:

  • 你能粘贴你的 build.gradle(项目)吗?
  • 如何粘贴 build.gradle 先生
  • 实现 'androidx.viewpager2:viewpager2:1.0.0' 实现 'com.google.android.material:material:1.2.1' 实现 'androidx.coordinatorlayout:coordinatorlayout:1.1.0' 实现' androidx.drawerlayout:drawerlayout:1.1.1' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.2' implementation 'com.synnapps:carouselview:0.1.4' implementation 'com.irozon.运动鞋:运动鞋:2.0.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  • 存储库 { jcenter() google() } 依赖项 { 类路径 "com.android.tools.build:gradle:4.0.1" 类路径 "org.jetbrains.kotlin:kotlin-gradle-plugin:$ kotlin_version" // 注意:不要将应用程序依赖项放在这里;它们属于 // 在单个模块 build.gradle 文件中 } } allprojects { repositories { jcenter() google() } }
  • 不是这个,是另一个。通过添加 build.gradle 来编辑您的问题。

标签: android kotlin android-snackbar appium-snackbar


【解决方案1】:
    apply plugin: 'com.android.application'
    apply plugin: 'kotlin-android'
    apply plugin: 'kotlin-android-extensions'

    android {
    compileSdkVersion 30
    buildToolsVersion "30.0.2"

    defaultConfig {
        applicationId "com.example.sliderscreen"
        minSdkVersion 16
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner 
    "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard- 
   android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    }
    dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "org.jetbrains.kotlin:kotlin- 
    stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 
    'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.viewpager2:viewpager2:1.0.0'
    implementation 
    'com.google.android.material:material:1.2.1'
    implementation 
    'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
    implementation 'androidx.drawerlayout:drawerlayout:1.1.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    implementation 'com.synnapps:carouselview:0.1.4'

    implementation 'com.irozon.sneaker:sneaker:2.0.0'
    androidTestImplementation 
    androidx.test.espresso:espresso-core:3.3.0'

    }

【讨论】:

    【解决方案2】:
        buildscript {
            ext.kotlin_version = "1.3.72"
            repositories {
                mavenCentral()
                jcenter()
                google()
        
            }
    
    
    allprojects {
        repositories {
            mavenCentral()
            jcenter()
            google()
    
        }
    }
    

    【讨论】:

      【解决方案3】:

      你只需添加这一行

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

      在您的 build.gradle(项目)文件的代码段上。

      allprojects {
          repositories {
            google()
            mavenCentral()
            maven { url 'https://jitpack.io' }
            jcenter()
         }
      }
      

      【讨论】:

      • implementation 'org.aviran.cookiebar2:cookiebar2:1.1.4' ....Adding this Dependencies 同样的问题显示我
      • 我已经使用了这个实现 'com.irozon.sneaker:sneaker:2.0.0'。为我工作。
      • 只需做一件事,将 mavenCentral() 和 jcenter() 一起放入 build.gradle(项目)文件中。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-04-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-11
      • 2018-11-26
      • 2016-12-11
      相关资源
      最近更新 更多