1

I want to import a project named StackBlur from GitHub as my library. But error happened when I modify .gradle files.

app/build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

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

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile project (':libs:StackBlur')
}

settings.gradle:

include ':app'
include ":libs:StackBlur"

And my project structure looks like:

-YoBey
-app
 -build.gradle
-libs
 -StackBlur
   -src
   -build.gradle
-settings.gradle
-build.gradle
Tobias
  • 7,723
  • 1
  • 27
  • 44
BP233
  • 85
  • 2
  • 9
  • Welcome to StackOverflow! "error happened" is not really useful, please post the exact error message in your question. – Tobias Aug 12 '15 at 09:23
  • This answer will be helpful to you. Please add dependencies to your project as mentioned here. http://stackoverflow.com/a/16639227/631803 – Vikasdeep Singh Aug 12 '15 at 09:28
  • The log is only "Configuration with name 'default' not found " – BP233 Aug 12 '15 at 09:28

1 Answers1

0

Replace " " with ' '

Try this:

app/build.gradle:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile project (":libs:StackBlur")
}

settings.gradle:

include ':app'
include ':libs:StackBlur'
Vikasdeep Singh
  • 20,983
  • 15
  • 78
  • 104