For eg : 'com.android.support:appcompat-v7:24.1.1' Where it is actually stored and how android studio identify its location ? . We are not mentioning the url when we add libraries to our project.
Fom the codes like ''com.android.support:appcompat-v7:24.1.1'' how the android studio fetch its actual location . Is it stored in github ?
Related
I was unable to include the Facebook Android SDK in the normal way so I downloaded a jar and added it to Android Studio. For some strange reason I get an error Unresolved reference: FacebookSdk even though I can see the class in the Project view:
If I am doing the wrong thing can somebody please give a lucid explanation of how to download and use the Facebook SDK in Android Studio 3.
Edit
I need to use the Facebook SDK in my app and I need to download it and add it 'offline'.
this is the sources package (as it's filename may hint for), which is for reference only. you should possibly add a dependency to the build.gradle instead; it's from the mavenCentral() repository, you can also find the artifacts here ...and a whole lot of other Facebook SDKs here.
dependencies {
implementation "com.facebook.android:facebook-android-sdk:4.36.0"
}
and also move those sources outside of the libs directory
(they still can be linked together with the fetched library).
I recently found the MaterialViewPager library on Github where the author also included a sample app. The sample app on Github is dependent to two other moduels :
materialviewpager
materialviewpagercontroller
I tried to convert the sample app provided into an standalone app by creating a blank project in Android Studio and including :
compile ('com.github.florent37:materialviewpager:1.2.0#aar'){
transitive = true
}
in the build file. Then I copied all the files in the sample folder to the app but I got so many errors in every file, after removing a lot of files and getting the app to compile I got this:
Since I am new to Android Studio and I spent two hours trying this without any success, can someone please let me know how I can convert the sample app the author provided to a standalone sample app?
In an android project, when you install library with gradle
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
Is there a way to look at the source of the library?
edit
https://developers.facebook.com/docs/android/getting-started
Talks about the sample code is included in the sdk. How do I view this sample source?
You can see the source code and the samples of Facebook Android SDK on GitHub:
https://github.com/facebook/facebook-android-sdk/
https://github.com/facebook/facebook-android-sdk/tree/master/samples
you can to initialize FB sdk 4.0 in sattings.gradle file
include ':app', 'FacebookSdk'
it will load whole SDK.
but still it gives you just iml file. it just pulls everything dynamically when called.
----------- Edit ----
I just tried rightnow,
If you are using android studio,
Just select your project explorer, as Project. generally its Android.
it that you will see whole list.
I can see facebook folder with all of its classes.
Let me know if it works for you.
Here in my project i have initialized FB SDK 4.0.
I have Android Studio 1.0.2 and I'm trying to use the
Dropbox API, but I'm unable to reference a project DropboxChooserSDK.
Their instructions refer to Eclipse not Android Studio and the other answers here don't go upto 1.0.2.
So how would Android Studio allow you to reference a project?
Need to set the “dependencies” to Dropbox API with Gradle.
The instruction below are for setting dependencies with the Android Studio GUI. I not exactly sure about the Dropbox API, never used it. I tried the instruction with other libraries, JAR and it seems to work OK.
TRY:
With in the Project needing to use Dropbox API.
Android Studio Main Menu - > File - > Project Structure.
Select within the panel on the Left Hand Side the folder where the API will be used. That NEEDS to have access to the Dropbox API.
Select the Tab marked “Dependencies”.
Within the “Dependencies” tab.
One the Top Right Hand side Select the Green Plus Sign.
Pick one of:
1 Library dependency.
2 File dependency.
3 Module dependency.
As An Aside.
Sometimes I had to try more than one of the above to get it to work.
A dialog box pops up
Set the path to the location of the DropBox API.
OK, Gives a a dialog that select the DropBox API.
Click "Apply"
Click "OK"
Gradle sync should run.
Once the “Dependencies” AND gradlle Sync gives “BUILD SUCCESSFUL”.
You Should be able to access the DropBox API within your project.
Android Studio should handle all the import stuff in the header of the Java class file where you need to use the DropBox API.
Just put in the name of one of the class defined in the DropBox API in you project.
when Android Studio underlines that class in red, put you mouse on the red under line in the class file.
ALT ENTER and pick import class:
Hope that helps you sort out getting the DropBox API in to your project.
Mark_97
i'm try to upload video from youtube without using intent
in my previous Q
using youtube data in android project
Ibrahim Ulukaya Proposed to use in his example https://code.google.com/p/ytd-android/
at the time i add the project i receive message " built path contains duplicate entry 'src' for project "Youtube Direct ..."
this after i Include Google Play Services library to the project (this fix the all compile error exapt this "Error generating final archive: Found duplicate file for APK: resources.arsc")
in some form i saw that problem cause from marven plug in
so i add m2eclipse plugin maven-android-plugin
but i dont understand after i red marvel introdution what marvel do and for what the project need this plug in ???
Currently I am in state that I can not even start the project because of compilation problem.
Someone was in this situation and know what I need to do for resolve this and start working with the project???
Ibrahim Ulukaya told me that i don't need the whole project, i can just use UploadService.java and ResumableUpload.java.
so I deleted the other files but did not help
I think Maven is a really good tool, but if you want you can create an Eclipse Android project without Maven, that is simpler. Then copy the code from the src folder and resources from the res folder.
You must include Google Play Services and the latest YouTube client library for Android with its dependencies:
https://code.google.com/p/google-api-java-client/wiki/APIs#YouTube_Data_API