2

I'm having trouble adding the Parse library to my project. I have the Parse jar in a folder called libs. The Gradle sync completes successfully, but the library doesn't show up under "External Libraries."

Here is my build.gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 17
buildToolsVersion '19.1.0'

defaultConfig {
    applicationId "com.qrazhan.food"
    minSdkVersion 16
    targetSdkVersion 20
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile files('libs/Parse-1.7.0.jar')
}

I'm using the default Gradle wrapper included with Android Studio.

EDIT: The gradle build finishes successfully without error, but I still cannot use the library. Here is a screenshot: https://www.dropbox.com/s/e0a3eydaj96nfg7/Screenshot%202014-10-03%2011.00.46.png?dl=0

2 Answers2

1

Does the library file name really starts with a capital?

Otherwise try

compile fileTree(dir: 'libs', include: ['*.jar'])

instead of enumerating all jar files.

userM1433372
  • 5,345
  • 35
  • 38
  • I've tried this and it still doesn't work. The Gradle build finishes without error, yet I still can't use any of the classes in the library. Maybe [this will help?](https://www.dropbox.com/s/e0a3eydaj96nfg7/Screenshot%202014-10-03%2011.00.46.png?dl=0) – Prashan Dharmasena Oct 03 '14 at 18:04
1

I ended up solving this. I have no idea what went wrong with Android Studio. I had to make a new project. This time, Android Studio automatically made the libs folder for me and I was able to copy in the JAR and right-click -> "Add as Library"