I followed this link, and then run gradle build.
https://github.com/saturday06/gradle-android-scala-plugin
It raised error of:
 gradle build --daemon -s
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'hello-scaloid-gradle-master'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
   > Could not find com.android.support:multidex:1.0.0.
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/support/multidex/1.0.0/multidex-1.0.0.pom
         https://jcenter.bintray.com/com/android/support/multidex/1.0.0/multidex-1.0.0.jar
     Required by:
         :hello-scaloid-gradle-master:unspecified
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'hello-scaloid-gradle-master'.
    at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:91)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:86)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:65)
gradle setting is:
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:1.0.0-rc1"
        classpath "jp.leafytree.gradle:gradle-android-scala-plugin:1.3.1"
    }
}
repositories {
    jcenter()
}
apply plugin: "com.android.application"
apply plugin: "jp.leafytree.android-scala"
android {
    compileSdkVersion "android-21"
    buildToolsVersion "21.1.1"
    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 21
        testInstrumentationRunner "com.android.test.runner.MultiDexTestRunner"
        versionCode 1
        versionName "1.0"
    }
    sourceSets {
        main {
            scala {
                srcDir "src/main/scala" // default: "src/main/scala"
            }
        }
        androidTest {
            scala {
                srcDir "src/androidTest/scala" // default: "src/androidTest/scala"
            }
        }
    }
    dexOptions {
        preDexLibraries false
    }
}
dependencies {
    compile "com.android.support:multidex:1.0.0"
    compile "org.scala-lang:scala-library:2.11.4"
}
tasks.withType(ScalaCompile) {
    scalaCompileOptions.deprecation = false
    scalaCompileOptions.additionalParameters = ["-feature"]
}
afterEvaluate {
    tasks.matching {
        it.name.startsWith("dex")
    }.each { dx ->
        if (dx.additionalParameters == null) {
            dx.additionalParameters = []
        }
        dx.additionalParameters += "--multi-dex"
        dx.additionalParameters += "--main-dex-list=$rootDir/main-dex-list.txt".toString()
    }
}
                I suspect that you put all the configuration into your app level build.gradle.
Maybe try it like this ->
project/build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.1.3'
        classpath "jp.leafytree.gradle:gradle-android-scala-plugin:1.4"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
allprojects {
    repositories {
        jcenter()
    }
}
project/app/build.gradle
apply plugin: 'com.android.application'
apply plugin: "jp.leafytree.android-scala"
android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"
    defaultConfig {
        applicationId "your.apps.id"
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile "org.scala-lang:scala-library:2.11.6"
    compile 'com.android.support:appcompat-v7:22.0.0'
}
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With