build.gradle 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. apply from: "config.gradle"
  2. buildscript {
  3. repositories {
  4. jcenter()
  5. google()
  6. mavenCentral()
  7. }
  8. dependencies {
  9. classpath 'com.android.tools.build:gradle:3.0.1'
  10. classpath 'com.jakewharton:butterknife-gradle-plugin:8.4.0'
  11. classpath "io.realm:realm-gradle-plugin:5.1.0"
  12. // classpath 'com.jakewharton:butterknife-gradle-plugin:8.5.1'
  13. // NOTE: Do not place your application dependencies here; they belong
  14. // in the individual module build.gradle files
  15. }
  16. }
  17. allprojects {
  18. repositories {
  19. jcenter()
  20. google()
  21. mavenCentral()
  22. //maven {url 'https://dl.bintray.com/jetbrains/anko'} //这是你需要加入的,这个是解决这个问题的关键地方,我就是添加这个maven后不再报上面的错误了
  23. maven { url "https://jitpack.io" }
  24. //maven { url "https://maven.google.com" }
  25. maven { url "https://maven.aliyun.com/repository/google" }
  26. }
  27. //打印出详细错误
  28. // gradle.projectsEvaluated {
  29. // tasks.withType(JavaCompile) {
  30. // options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
  31. // }
  32. // }
  33. }
  34. task clean(type: Delete) {
  35. delete rootProject.buildDir
  36. }