简体   繁体   English

将parse.com库导入Android studio 0.8.2

[英]Import parse.com library into Android studio 0.8.2

I'm trying to import the Parse-1.5.1.jar file into my project in Android studio following these steps: - File -> Project structure - Click on the plus button and click on Import .JAR or .AAR package - Choose my jar file and then hit finish 我正在尝试按照以下步骤将Parse-1.5.1.jar文件导入到我的Android Studio项目中: - 文件 - >项目结构 - 单击加号按钮并单击导入.JAR或.AAR包 - 选择我的jar文件然后点击完成

But then any command from the parse library is recognized. 但是,然后识别来自解析库的任何命令。 For example : "Cannot resolve symbol ParseObject" and android studio doesn't propose me to import anything. 例如:“无法解析符号ParseObject”,android studio不建议我导入任何东西。

I can't find on stackoverflow any instruction for these version of Android studio and Parse. 我无法在stackoverflow上找到这些版本的Android studio和Parse的任何指令。

Any suggestion ? 有什么建议吗?

Today i too started with Parse. 今天我也开始使用Parse了。 All you need to do is: 你需要做的就是:

  • Copy the parse-1.5.1.Jar file (Ctrl+c) and paste it in app->libs folder 复制 parse-1.5.1.Jar文件(Ctrl + c) 并将粘贴app-> libs文件夹中
  • Ensure build.gradle inside the app folder contains this line: compile fileTree(dir: 'libs', include: ['*.jar']) 确保app文件夹中的build.gradle包含以下行: compile fileTree(dir: 'libs', include: ['*.jar'])

That's it. 而已。 You just need to click on Sync Project with Gradle Files button on the top to rebuild your project. 您只需单击顶部的“使用Gradle文件同步项目”按钮即可重建项目。 You'll now be ready to use the classes from the Parse Library. 您现在可以使用Parse Library中的类了。

Hope this helps. 希望这可以帮助。 All the best 祝一切顺利

Take your Parse-1.8.4.jar file and copy and paste it into your libs folder. 获取Parse-1.8.4.jar文件并将其复制并粘贴到libs文件夹中。 在此输入图像描述

Then make sure your manifest has all the correct permissions. 然后确保您的清单具有所有正确的权限。 Here is some, but there are more permissions than this: 这是一些,但有比这更多的权限: 在此输入图像描述

Make sure you have the parse class that extends Application and calls Prase.initialize in onCreate(). 确保你有扩展Application的parse类并在onCreate()中调用Prase.initialize。

Then go to File -> Project Structure. 然后转到文件 - >项目结构。 In the pop-up, select "app" -> "Dependencies" tab -> Click on the plus sign and select "File dependency". 在弹出窗口中,选择“app” - >“Dependencies”选项卡 - >单击加号并选择“文件依赖关系”。 Then select your "Parse-1.8.4.jar" file. 然后选择“Parse-1.8.4.jar”文件。

在此输入图像描述在此输入图像描述

Firstly open your project libs file. 首先打开您的项目libs文件。 Download parse example project code from https://www.parse.com/tutorials#android . https://www.parse.com/tutorials#android下载解析示例项目代码。 opy the libs file.Paste them to your project file/libs file.Click File in android studio and then click project structure tab or hit the F4 if its work. 选择libs文件。将它们粘贴到你的项目文件/ libs文件中。单击android studio中的File,然后单击项目结构选项卡或点击F4(如果它的工作)。 And click "app" left side of tab in opened window.Then Dependencies tab. 然后在打开的窗口中单击选项卡左侧的“app”。然后单击依赖选项卡。 Click "+" on right side. 点击右侧的“+”。 Click File Dependency and click libs and find the Parse.xxx.jar file and click OK and Apply . 单击File Dependency并单击libs并找到Parse.xxx.jar文件,然后单击OK和Apply。 Tahts it. Tahts吧。 And you can also take look here https://www.parse.com/tutorials#android . 你也可以看看https://www.parse.com/tutorials#android

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM