2016-01-01 124 views
0

项目我已经面临着这样的错误:无法添加库在Android工作室

"Failed to resolve:com.github.ygorbarboza:AKParallax-Android:fce9eac521"

"Showing error :Gradle DSL method not found:'maven()' "

这是我的build.gradle文件。

apply plugin: 'com.android.application' 

    android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.1" 
    defaultConfig { 
     applicationId "com.example.abhishek.experiment" 
     minSdkVersion 11 
     targetSdkVersion 23 
     versionCode 1 
     versionName "1.0" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
    productFlavors { 
    } 
} 

    dependencies { 
    compile fileTree(include: ['*.aar'], dir: 'libs') 
    compile 'com.android.support:appcompat-v7:23.1.0' 
    compile 'com.android.support:design:23.1.0' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.github.ygorbarboza:AKParallax-Android:fce9eac521' 

} 

我甚至增加了库

repositories { 
    maven { 
     url "https://jitpack.io" 
    } 
}  
+1

请改为张贴图片的代码,如果你使用的图像而不是你的真实代码*我们将无法复制粘贴,运行和调试它。 –

+0

我已经添加了代码,请看看 – abhishek

回答

0

您需要添加

repositories { 
    maven { 
     url "https://jitpack.io" 
    } 
} 

提到here

+0

已经试过了,仍然显示相同的错误。 – abhishek

+0

复制粘贴完整的gradle文件,以便我们可以正确地看看哪里出错 –

+0

我已经在这里更新了build.gradle代码 – abhishek