How To Add Parse to an Android Studio Project?

前端 未结 8 1677
野趣味
野趣味 2020-12-24 01:22

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 libr

相关标签:
8条回答
  • 2020-12-24 02:12

    In your app gradle add below code

    dependencies {
        compile 'com.parse.bolts:bolts-android:1.+'
        compile 'com.parse:parse-android:1.+'
    }
    

    In AndroidManifest.xml file add below permission

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    

    In your Application class inside onCreate() method add below code

    Parse.initialize(this, "application_id", "client_key");
    ParseInstallation.getCurrentInstallation().saveInBackground();
    

    then run. Hope this works, for more info https://parse.com/apps/quickstart#parse_data/mobile/android/native/existing

    0 讨论(0)
  • 2020-12-24 02:17

    1) I unzip the folder into the libs folder:

    YourProject/app/libs/Parse-1.9.2/ <<< here all the jar files.

    2) and then in the dependencies section from your build.gradle, I set:

    dependencies { 
        ...
        // Parse 1.9.2
        compile 'com.parse.bolts:bolts-android:1.+'
        compile fileTree(dir: 'libs/Parse-1.9.2', include: 'Parse-*.jar')
        ...
    }
    

    I set the specific folder where the jars are contained dir: 'libs/Parse-1.9.2'

    Hope it helps!

    0 讨论(0)
提交回复
热议问题