Unable to resolve dependency for ':app@compileOptions/compileClasspath': Could not resolve projec...

Unable to resolve dependency for ':app@compileOptions/compileClasspath': Could not resolve project :pickerview.

导入第三方库的时候会爆这个错误 

Unable to resolve dependency for ':app@compileOptions/compileClasspath': Could not resolve project :pickerview.


Unable to resolve dependency for ':app@compileOptions/compileClasspath': Could not resolve projec..._第1张图片
这是一类问题,在导入第三方项目中出现的类似问题解决

这是错误的详细内容展开,百度后找到解决方法:

将app下的build.gradle中 buildTypes {}中的内容基本一直,有什么字段就都要有什么,例如app下build.gradle中都有这些内容:

buildTypes {

        release {

            minifyEnabled false

            signingConfig signingConfigs.debug

            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }

        signingConfigs {

            debug {

                storeFile file('debug.keystore')

                storePassword "android"

                keyAlias "androiddebugkey"

                keyPassword "android"

            }

        }

    }

而导入的pickerview中的gradle可能只有这些内容

buildTypes {

        release {

            minifyEnabled false

            signingConfig signingConfigs.debug

            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'

        }

}

将singingConfigs直接粘贴复制过来问题即可解决. 自己的项目·跟·第三放库必须一致

你可能感兴趣的:(Unable to resolve dependency for ':app@compileOptions/compileClasspath': Could not resolve projec...)