Import parse.com library into Android studio 0.8.2 - android

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
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.
I can't find on stackoverflow any instruction for these version of Android studio and Parse.
Any suggestion ?

Today i too started with Parse. All you need to do is:
Copy the parse-1.5.1.Jar file (Ctrl+c) and paste it in app->libs folder
Ensure build.gradle inside the app folder contains this line: 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. You'll now be ready to use the classes from the 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.
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().
Then go to File -> Project Structure. In the pop-up, select "app" -> "Dependencies" tab -> Click on the plus sign and select "File dependency". Then select your "Parse-1.8.4.jar" file.

Firstly open your project libs file. Download parse example project code from 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. And click "app" left side of tab in opened window.Then Dependencies tab. Click "+" on right side. Click File Dependency and click libs and find the Parse.xxx.jar file and click OK and Apply . Tahts it. And you can also take look here https://www.parse.com/tutorials#android.

Related

Edit Classes From Github Libraries

I have installed the folder picker as per instructions from Github found on this link: https://github.com/kashifo/android-folder-picker-library
I have added the following line to gradle:
implementation 'lib.kashif:folderpicker:2.4'
And added to MainActivty:
import lib.folderpicker.FolderPicker;
And in onCreate:
Intent intent = new Intent(ActivityFolder.this, FolderPicker.class);
startActivityForResult(intent, PICKFILE_REQUEST_CODE);
Everything works fine accept that this type of installation seems to be working 'online' as I don't understand where this class is: FolderPicker.class, I would like to make changes to it and its xml layout (remove the New button etc..), how can I edit this library and customize it instead of using it as it is?
I have also downloaded the entire package as well and it also doesn't have all classes and layouts located within the app folders.
You are looking in to wrong folder , The app folder is for the sample project . The actual library will be in folder with name folderpicker
Here is the link to the class FolderPicker.java .
If you want to customize the library then clone the project , edit the parts you want in folderpicker and include the the folderpicker module to your project Or generate an aar file and add aar file in the project . If you have time you can even publish on jcentre/maven and directly include it as a gradle dependency
Follow This Steps For Import Module and Edit Libraries class in Android Studio.
First Download Project From Github Then Go to Android Studio-> File -> New -> Import Module...
Select the source directory of the Module you want to import and click Finish.
Open Project Structure and open Module Settings for your project.
Open the Dependencies tab.
Click the (+) icon and select Module Dependency. Select the module and click Ok.
Open your build.gradle file and check that the module is now listed under dependencies.(implementation project(path:":YOUR_PROJECT_MODULE_NAME")

How to add third party SDK in android studio

I want to add third party sdk in my android project.
Can anyone tell me the process step by step....
I tried but can't...
My Process:
Copy and paste jar file in libs folder
Add dependency in build.gradle file
then clean the project and build
You can try below methods :
First method:
switch your folder structure from Android to Project.-> paste the .jar file inside libs folder->Right click on the jar file and at end click on Add as library->This will take care of adding compile files('libs/library_name.jar') in build.gradle after sync gradle -> make sure compile files('libs/library_name.jar') added your build.gradle file -> Then build your project
Second method:
2.(If 1st method does not work for you then try it.)
switch your folder structure from Android to Project.-> paste the .jar file inside libs folder->Select Dependencies Tab, add the file by using + .Click on file dependency and Select your jar file from libs directory.->Then click OK->This will take care of adding compile files('libs/library_name.jar') in build.gradle after sync gradle -> make sure compile files('libs/library_name.jar') added your build.gradle file -> Then build your project.
Open the Android SDK Manager. At the tools tab selecct Manage Add-on Site. Then go to the User Defined Sites tab and click new. A the prompt dialog enter the URL you wish to add. Then close the window. Back at the Android SDK Manager scroll down and u should be able to locate the SDK u added. If needed at the packages tab of the SDK Manager click Show Archive Details

Android Referencing a library project

My question might be very simple but I cant find the answer:
For my android project I try to implement https://github.com/iPaulPro/aFileChooser
In the installation instructions we find:
Add aFileChooser to your project as an Android Library Project.
with a link to http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject When i follow the link point 1 is :
1. Make sure that both the project library and the application project
that depends on it are in your workspace.
If one of the projects is missing, import it into your workspace.
How should I do this points ? zip aFileChooser into the main folder, or do i need to right click on app and create new Package or something ?
Note : im using android studio and followed the tutorial in the comments, but android studio dosnt recognize the project as a library. I got the project from github by downloading the zip.
1 - In your project's "main" root directory (where the res, java and AndroidManifest.xml file located) create a new folder:
/libs
2- Paste your library in newly created
/libs
folder. Now just download ZIP from Github, rename library directory to "aFileChooser" and copy it.
3 - In app/build.gradle add your library project as an dependency:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile project(":aFileChooser")
}
To resolve this problem:
Download and unzip the library
In your project go to file-> new -> import module -> click on the small button at the right and choose the library that you are downloaded ->ok
NOTE: INTO 'aFileChooser-master' THERE ARE 2 FOLDERS: aFileChooser AND aFileChooserExample. YOU SHOULD SELECT aFileChooser
Now go to file -> project structure -> select the tab 'app' at the left ->select the tab 'dependencies' -> click on the plus button -> choose module dependencies -> select the library ->ok
Finish. Now you can use the classes of the library in your project.

Android facebook sdk import error

i had download facebook skd import it in my eclipse add v4 jar file and change complier to 1.6 but yet it give me error in class FacebookAppLinkResolver
import bolts.AppLink;
import bolts.AppLinkResolver;
import bolts.Continuation;
import bolts.Task;
above are not import
1.Open your project properties
2.Select "Java Build Path" from left side menu
3.Select "Libraries" tab
4.Press "Add External Jar"
5.MOST IMPORTANT STEPS :-
Select "bolts" jar file of "libs" folder of YOUR CURRENT PROJECT LOCATION(Path Should be
of your project only and not the android sdk).
6.Select "Order and Export" tab and "TICK" the checkbox of "android-support-v4.jar"
Download sdk for Bolts library from
https://github.com/BoltsFramework/Bolts-Android
and add this project with facebook sdk project.
Or if you're using Gradle you can add this to your Gradle file:
dependencies {
compile 'com.parse.bolts:bolts-android:1.1.3'
}
Facebook is also available so you don't have to add that manually either. To include both use the following:
dependencies {
compile 'com.facebook.android:facebook-android-sdk:4.5.0'
compile 'com.parse.bolts:bolts-android:1.1.3'
}
You can check for the latest version of Bolts here.
amalBit's answer works great for Eclipse. Here is the Android Studio equivalent.
I encountered this error after updating to the latest Facebook SDK for Android.
File ->
Project Structure ->
Select the Facebook module on the left
Select the Dependencies tab
Press the + button at the bottom of the
window
Select File Dependency
In the libs folder, you should see the
bolts.jar file you copied over when updating the SDK.
Select the
bolts.jar file and press OK
Then press Apply and OK
Doing a Gradle Sync (happened automatically for me) should resolve the error.
I had the same problem. Check your facebook-sdk/facebook folder to see if there is a libs file (Not directory)
So I think Android studio failed to import the libs as a directory instead included a libs file with "../libs" in it.
Not sure if this was facebook-sdk issue, git cloning issue or android studio issue.
Solution:
1. remove the dummy libs file
2. copy the libs directory manually
3. remove the dependency in project structure
4. add it manually by clicking + sign

How to import external library in android studio?

I struggle to import library 'PageSlidingTapStrip'(https://github.com/astuetz/PagerSlidingTabStrip).
I found this question(How to import eclipse library project from github to android studio project?), and I follow this solution.
cf)I'm using win 8.1 , android studio version 0.3.6
First, build new project like this condition.
Second, go to File -> New Module click, create new module as android library and make condition like this.( Unchecked create custom launcher icon, activity )
And this part I got a first question. Which version should I choice version about 'Minimum required SDK' , 'Target SDK', 'Compile with'? Just Follow project version? (image show default value when I create this window first.)
Anyway, I progress under condition ' Minimum required SDK : API 9 / Target SDK : API 19 / Compile with : API 19 '
Third, delete files under 'Project/PageSlidingTabStrip/src/main/' and copy folder&file under external library 'res', 'src', 'AndroidManifest.xml' and move into 'Project/PageSlidingTabStrip/src/main/' then renamed src to java.
And then project & folder become like this. (what I followed question as , told me copy and move file 'ic_launcer-web.png' apart from 'res', 'src', 'manifest' , but I can't find that file)
Fourth, go to 'File -> Project setting -> Module -> click project module -> '+' button -> select Module dependency' then apply.
After that, I face this error and cannot resolve R.
And I can't go next step, can't finish import library.
What should I do?
Is there any other solution?
Thanks for seeing long question. I hope to get a solution!
I also use the PagerSlidingTabStrip Project in my app and everything works fine.
I'm not sure if it's already possible to add a library project via the IDE (-> without any problems).
Please try to add the library project by editing the gradle files like this:
first delete your module PagerSlidingTabStrip
then create a folder in your root project directory (-> NewOne) named 'libs'
copy the complete folder 'library' of the PagerSlidingTabStrip project on git into 'libs'
rename the folder 'library' that you just copied to e.g. "PagerSlidingTabStripLibrary" (just to avoid confusion) -> after the renaming you should have the path: "NewOne/libs/PagerSlidingTabStripLibrary"
now add this library in your settings.gradle with the following command:
include ':libs:PagerSlidingTabStripLibrary'
go to your build.gradle file of your AppProject aps and add the following line to your 'dependencies':
compile project(':libs:PagerSlidingTabStripLibrary')
at least you have to sync your gradle files: Tools -> Android -> Sync Project with Gradle Files
Please try this. If you get errors please post the log file.
For update up to Android Studio 1.2.1.1
There are basically three types of dependencies which we have to add in project of android Studio
Add Normal Dependencies like Support files
Right click on project->open module settings
Select dependencies->Now press right "+" icon button ->Select
library Dependencies
Enter Name and Search
Select file and press ok button.
Add Git Hub Dependencies
Find the dependencies of git repository for example compile 'com.jakewharton:butterknife:6.1.0' from https://github.com/JakeWharton/butterknife
A. open build.gradle(module:app) file
B. Add lines compile 'com.jakewharton:butterknife:6.1.0'
OR
Follow as describe above in Normal Dependencies Step by just enter dependencies in search bar
Add Jar files Dependencies
Right click on project->open module settings
press left "+" icon (insert new Module) button -> Select import Jar or .AAR package->browse Jar file and finish
Now select dependencies-> press right "+" icon button ->Select module Dependencies->select jar files->press ok button.
For what it's worth I had this problem and eventually solved it by consistently using the same sdk version & build tools across projects.

Categories

Resources