I'm want to implement Twitter login in my app, but I can't import any of the related classes.
In my gradle I added:
implementation 'com.twitter.sdk.android:twitter:3.3.0'
gradle sync works fine, app compiles and run, but I'm not able to import any of the com.twitter classes like TwitterConfig. If I write "Twitter" and let Android Studio suggest me the only option I get are TwitterAuthCredential and TwitterAuthProvider both from com.google.firebase.auth.
What is going on? Am I missing some gradle line?
I managed to solve it importing only the dependecies I needed:
implementation 'com.twitter.sdk.android:twitter-core:3.3.0'
implementation 'com.twitter.sdk.android:tweet-ui:3.3.0'
implementation 'com.twitter.sdk.android:tweet-composer:3.3.0'
implementation 'com.twitter.sdk.android:twitter-mopub:3.3.0'
It migth be related to the large size of the library.
Related
I don't know why android studio is not able to resolve Client and Query from the import statements:
import com.algolia.search.saas.Client;
import com.algolia.search.saas.Query;
It is showing cannot resolve Client and Query on the both import statements.
This is present in my app Gradle file:
implementation 'com.algolia:instantsearch-android:1.15.0'
I tried invalidating caches and restart multiple times and even tried to change the version of Algolia dependency in Gradle file above, but nothing worked.
I am not able to understand why is this happening, I would appreciate if someone could help me in this.
try this:
https://www.algolia.com/doc/guides/building-search-ui/installation/android/
dependencies {
// [...]
implementation 'com.algolia:instantsearch-android:1.+'
// This will automatically update to the latest v1 release of InstantSearch
// OR
implementation 'com.algolia:algoliasearch-android:3.+'
// This will automatically update to the latest v3 release of the client
}
try including this also
implementation 'com.algolia:instantsearch-androidx-core:1.15.2'
I'm using the androidx libraries so your mileage may vary, but adding
implementation 'com.algolia:algoliasearch-android:3.27.0'
resolved the problem for me.
I need to import Couchbase Lite in one of my proyects. I dont want to use Gradle . So basically what I am doing is :
I have donwloaded the proyect from github
I have imported it like a new module (File->New->Impor module->path)
After compilate the proyect I am facing an error,
Cannot resolve symbol AndroidContext
so I need the class
AndroidContext
That class is here so I am trying to import it like the previuse one, like a module, but I am facing this error.
What I am doing wrong? What I should do for import CouchBase lite to android not using
compile 'com.couchbase.lite:couchbase-lite-android:1.4.0'
There are a number of other dependencies that you might need:
implementation 'com.couchbase.lite:couchbase-lite-android:1.4.4'
// To access the database through HTTP (often used for hybrid development and peer-to-peer sync).
implementation 'com.couchbase.lite:couchbase-lite-java-listener:1.4.4'
// To use ForestDB as the storage type.
compile 'com.couchbase.lite:couchbase-lite-android-forestdb:1.4.4'
// To enable encryption on SQLite databases.
compile 'com.couchbase.lite:couchbase-lite-android-sqlcipher:1.4.4'
// JavaScript view (map/reduce) engine for the REST API.
compile 'com.couchbase.lite:couchbase-lite-java-javascript:1.4.4'
Full documentation of gradle includes is here.
I'm followed some tuts for including the FB SDK
but when I want to import
import com.facebook.FacebookSdk;
I need this for FB analytics, so I'm created the class fbanalytic :
image here
and we see it's hidden i dont know fix it
and also someone his tell that class it's not important specialy in the latest version in fb sdk ,is that correct?
currently im using latest verion :facebook-android-sdk-4.22.1
Using the Facebook SDK:
Import the sdk by adding compile dependency to build.gradle file
dependencies {
compile 'com.facebook.android:facebook-android-sdk:4.+'
}
Now when you are trying to use something from Facebook's SDK it should be AUTOMATICALLY imported to your files.
In your example you are making a new Class that does uses AppEventsLogger that is part of Facebook SDK. The import statement that you presumably wrote (import com.facebook.FacebookSDK) is grey and second import statement clearly shows that it is importing form com.facebook.* SDK.
tldr: Android Studio imports from Facebook SDK as expected.
Add in build.gladle within dependencies bracket:
compile 'com.facebook.android:facebook-android-sdk:4.+'
Might be duplicate.
I'm trying to import this as a library in a project I'm working on in Android Studio:
https://github.com/d4rken/myolib
I cant workout exactly how to do it. even before I try to do this, I tried to open the project using new->Import project-> (selecting the settings.gradle). This then complained about not knowing about:
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
So I tried adding these manually using the advice on:
Importing github projects as library to existing project
Adding external library in Android studio
But its still complaining about no cached version for offline mode. If I do disable work in offline mode then, well it just sits there forever. I want to give it everything manually because in my experience disabling work in offine mode usually doesn't help.
I completely understand this isn't a new topic on Stackoverflow. The issue of how best to import libraries as .jar, .aar, .os etc. etc has been covered a few times. And yet most answers are subtly different and some work sometimes, others work other times.
Does anyone know of a detailed explanation about how I should achieve this ?
If anyone has been successful in importing this project and using its libraries I will be eternally grateful if you could tell me how you achieved such wizardry.
You import the library through your app's build.gradle file. An import section looks something like this:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:24.1.1'
compile "com.android.support:support-v13:24.1.1"
}
So to import the library you just linked, you would simply add this line to your dependencies section, as per the readme:
compile 'eu.darken.myolib:myolib:0.0.4'
I am 'lucky' to have been charged with maintaining a program developed by someone else, and I come across the following problem with an import statement:
import com.fizzbuzz.android.dagger.InjectingDialogFragment;
which Android Studio cannot resolve. I am totally new to dagger...
I have the following in build.gradle dependencies:
compile 'com.fizz-buzz:fb-android-dagger:1.0.1'
compile 'com.fizz-buzz:fb-android-bluetooth:1.0.3'
InjectingDialogFragment is not available in the version you are currently using. Please use compile 'com.fizz-buzz:fb-android-dagger:1.0.3' instead.
For better understating on how Dagger works you can use this blog http://antonioleiva.com/dagger-android-part-2/