1

I am trying to add AChartEngine as library for my project. I applied same steps in here: AChartEngine And Android Studio.

But I keep getting this error: Gradle DSL Method not found: maven ()

Here are my build.Gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.1.0'
    }
}

allprojects {
    repositories {
        jcenter()
    }
    maven {
        url "https://repository-achartengine.forge.cloudbees.com/snapshot/"
    }
}

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.0"

    defaultConfig {
        applicationId "com.example.ibm.drawing_1"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile files('libs/achartengine-1.1.0.jar')
    compile group: 'org.achartengine', name: 'achartengine', version: '1.2.0'
}
Community
  • 1
  • 1
Kito312
  • 25
  • 6
  • Move `maven` closure inside of the `repositories` closure at the `allprojects` – Sergii Pechenizkyi May 02 '15 at 17:26
  • New Error: Error:Content is not allowed in prolog. This is what I did: allprojects { repositories { jcenter() maven { url "https://repository-achartengine.forge.cloudbees.com/snapshot/" } } } – Kito312 May 02 '15 at 17:28

1 Answers1

0

It seems like the snapshot was removed from their site (so gradle can't find it). check my answer in here: https://stackoverflow.com/a/46768836/2556220

Yaron Recher
  • 2,348
  • 1
  • 13
  • 9