Trying to use spoon framework with Android Studio gradle project but getting an error when trying to add spoon plugin :
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.stanfy.spoon:spoon-gradle-plugin:1.0.4'
}
}
apply plugin: 'android'
apply plugin: 'spoon'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
androidTestCompile 'com.squareup.spoon:spoon-client:1.3.2'
}
Error:(13, 0) Plugin with id 'spoon' not found
and :
Error:Could not find com.stanfy.spoon:spoon-gradle-plugin:1.0.4.
Searched in the following locations:
file:/C:/Apps/Studio/gradle/m2repository/com/stanfy/spoon/spoon-gradle- plugin/1.0.4/spoon-gradle-plugin-1.0.4.pom
file:/C:/Apps/Studio/gradle/m2repository/com/stanfy/spoon/spoon-gradle-plugin/1.0.4/spoon-gradle-plugin-1.0.4.jar
https://maven.fabric.io/public/com/stanfy/spoon/spoon-gradle-plugin/1.0.4/spoon-gradle-plugin-1.0.4.pom
https://maven.fabric.io/public/com/stanfy/spoon/spoon-gradle-plugin/1.0.4/spoon-gradle-plugin-1.0.4.jar
gradle command line complaints about this link:
Did you noticed that your project has two build.gradle files? I'm pretty sure you added to one file and that's the problem you're facing
In first
build.gradle
(app) you should have dependencies like these:In the second
build.gradle
file (yourApplicationName), you should have:Hope this would help you