androidstudio 编译问题 Error:Could not find method compile() for arguments...

编译时出问题:

Error:Could not find method compile() for arguments [com.android.support:support-compat:26.0.0] on DefaultExternalModuleDependency{group='com.android.support', name='support-v4', version='26.0.0', configuration='default'} of type org.gradle.api.internal.a


原因:

build文件中的 dependdencies 里边有多个compile 在一行

dependencies {
    compile project(':libvlc')
    compile 'com.android.support:support-v4:' + rootProject.ext.appCompatVersion   compile 'com.android.support:support-compat:' + rootProject.ext.appCompatVersion  compile 'com.android.support:support-fragment:' + rootProject.ext.appCompatVersion
}

解决办法:

加回车分行写

dependencies {
    compile project(':libvlc')
    compile 'com.android.support:support-v4:' + rootProject.ext.appCompatVersion
    compile 'com.android.support:support-compat:' + rootProject.ext.appCompatVersion
    compile 'com.android.support:support-fragment:' + rootProject.ext.appCompatVersion
}


你可能感兴趣的:(androidstudio 编译问题 Error:Could not find method compile() for arguments...)