2017-12-02 63 views
0

錯誤:(36,0) 找不到方法api()參數[project':model'] on對象類型org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler找不到方法參數[project':model']上的方法api()

請幫幫我。

This is my build.gradle file.

apply plugin: 'com.android.application' 
//apply plugin: 'io.fabric' 

android { 
compileSdkVersion 26 
buildToolsVersion "26.0.2" 
defaultConfig { 
applicationId "com.manafzar.mytaxi.driver" 
minSdkVersion 16 
targetSdkVersion 26 
versionCode 23 
versionName "2.0.3" 
multiDexEnabled true 
vectorDrawables.useSupportLibrary = true 
javaCompileOptions { 
    annotationProcessorOptions { 
    arguments = [eventBusIndex: 
    'com.manafzar.mytaxi.driver.DriverEventBusIndex'] 
    } 
} 
} 
buildTypes { 
release { 
    minifyEnabled false 
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 
     'proguard-rules.pro' 
    } 
} 
dataBinding { 
    enabled = true 
    } 
} 

dependencies { 
    annotationProcessor 'org.greenrobot:eventbus-annotation-processor:3.0.1' 
    api project(':model') 
    api 'com.google.maps.android:android-maps-utils:0.5' 
    api 'com.diogobernardino:williamchart:2.5.0' 
} 
apply plugin: 'com.google.gms.google-services' 

回答

-1

請添加 「編譯」,而不是在你的依賴標籤 「API」。 並請添加以下代碼在主的build.gradle文件:

allprojects { 
    repositories { 
     jcenter() 
     google() 
     maven { 
      url "https://maven.google.com" 
     } 
    } 
} 
+0

我補充說,不工作 –

+0

請參見使用代碼片斷更新的答案,希望它有助於 –