Search code examples
android-studioparse-platform

How To Add Parse to an Android Studio Project?


I'm trying to use the Parse library in Android Studio. I have used the basic example on their website and added the jar to the libs folder as well as added as a global library. Nothing seems to be working without errors:

Gradle: package com.parse does not exist
Gradle: package com.parse does not exist
Gradle: package com.parse does not exist
Gradle: cannot find symbol variable Parse
Gradle: cannot find symbol variable ParseAnalytics
Gradle: cannot find symbol class ParseObject 
Gradle: cannot find symbol class ParseObject

Android Studio gives no errors in the code.


Solution

  • I encountered the same problem too and here's what I did:

    • I placed the entire Parse-1.2.5 in the libs folder (I didn't have to create the folder as Parse's quickstart said).
    • Open the build.grade file. There are two of them - open the one that's at the same level as the src folder
    • You'll see two instances of "dependencies". Add the following to the "dependencies" that is NOT nested under "buildscript":

      compile files('libs/Parse-1.2.5/Parse-1.2.5.jar')

    If that still doesn't work, try right clicking the Parse-1.2.5.jar file and select "Add to Project Library"

    Hope that helps!