【问题标题】:Failed to resolve Ksoap2无法解析 Ksoap2
【发布时间】:2019-05-15 16:01:36
【问题描述】:

我对 Android Studio 的说法有疑问:

无法解决 com.google.code.ksoap2-android:ksoap2-android:3.6.1

这是我的 build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 19
    buildToolsVersion '25.0.0'

    defaultConfig {
        applicationId "com.example.papiroomdemo.webservicetest"
        minSdkVersion 15
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        repositories {
            maven { url 'http://ksoap2-android.googlecode.com/svn/m2-repo' }

        }

    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')

    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.2.1'
    compile 'com.google.code.ksoap2-android:ksoap2-android:3.6.1'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    compile 'de.hdodenhof:circleimageview:2.0.0'
    compile 'com.hannesdorfmann.smoothprogressbar:library:1.0.0'
    compile 'com.github.castorflex.smoothprogressbar:library-circular:1.0.0'
}

错误:(30, 13) 无法解决: com.google.code.ksoap2-android:ksoap2-android:3.6.1 在文件中显示
在项目结构中显示 对话框

【问题讨论】:

    标签: java android android-gradle-plugin android-ksoap2


    【解决方案1】:

    我认为您在repositories 部分中的网址无效。你应该添加 https://oss.sonatype.org/content/repositories/ksoap2-android-releases/:

    repositories {
        maven { url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/' }
    }
    

    更多信息在这里:http://simpligility.github.io/ksoap2-android/getting-started

    【讨论】:

      【解决方案2】:

      /// 在模块 gradle 中添加这些行

      allprojects {
                  repositories {
                     google()
                     jcenter()
                  maven { url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/'
                 }
           }
      }
      

      【讨论】:

        猜你喜欢
        • 2011-04-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多