2017-08-05 11 views
0

我是在android studio中安裝庫的全新軟件,我遇到了麻煩。在嘗試設置我的依賴關係時,我一直在獲取錯誤,名稱不能爲空。我正在嘗試安裝this libraryAndroid gradle中的名稱不能爲null

這裏是build.gradle代碼。

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.3" 
    defaultConfig { 
     applicationId "com.example.webbj.imageeditor" 
     minSdkVersion 23 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

configurations{ 
    compile 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:25.3.1' 
    compile 'com.android.support:design:25.3.1' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    //compile 'com.isseiaoki:simplecropview:1.1.5' 
    **compile group: "com.isseiaoki", module: "simplecropview", version: "1.1.5"** 
    testCompile 'junit:junit:4.12' 
    compile project(':libraries:SimpleCropView') 

該錯誤發生在由星星包圍的線上。 我真的很感激任何人來幫助我解決這個問題。

回答

0

添加此行而不是該行。

compile 'com.isseiaoki:simplecropview:1.1.5' 
+0

當我這樣做,我得到的錯誤: 錯誤:項目:應用程序宣佈從配置的依賴「編譯」到 配置「默認」,這不是在描述符項目 聲明:庫:SimpleCropView 。 – tokenturtle

+0

也刪除這行:編譯項目(':libraries:SimpleCropView') – Bob

+0

它的工作!非常感謝! – tokenturtle

相關問題