buildscript { repositories { mavenCentral() maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' classpath 'org.robovm:robovm-gradle-plugin:1.12.0' classpath "org.xtext:xtext-gradle-plugin:1.0.12" //<-Added classpath "org.xtext:xtext-android-gradle-plugin:1.0.12" // <- Added }}
project(":android") { apply plugin: "android" apply plugin: "org.xtext.android.xtend" // <- Added configurations { natives }
dependencies { compile project(":core") compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64" compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi" natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a" natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-arm64-v8a" natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86" natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86_64" }}
project(":core") { apply plugin: "java" apply plugin: "org.xtext.xtend" // <-Added
dependencies { compile "com.badlogicgames.gdx:gdx:$gdxVersion" compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" compile "com.kotcrab.vis:vis-ui:1.0.1" compile 'org.eclipse.xtend:org.eclipse.xtend.lib:2.9.0' // <-Added }}
Caused by: org.gradle.api.GradleException: Android tasks have already been created.This happens when calling android.applicationVariants,android.libraryVariants or android.testVariants.Once these methods are called, it is not possible tocontinue configuring the model.