2016-01-01 121 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