Empty module after importing library from github - android

I just tried importing a library from GitHub and when I followed the steps to import it I noticed that the modules are empty and I can't do all of the steps to import the library because of that.
Is there a way to fix this?
And i cant do this:
implementation project(':libausbc')

Related

Importing a sample from an already imported library in android

In android studios, I have successfully imported a library called ChatKit(https://github.com/stfalcon-studio/ChatKit). The creators of the library were kind enough to include a fully working sample within the library. Instead of recreating the process I want to import the sample from the library into my project but android studios is not allowing me to do so.
In my main activity, I can add :
import com.stfalcon.chatkit.dialogs.DialogsList;
But when cannot add:
import com.stfalcon.chatkit.sample.ChatSamplesListAdapter;
So I'm curious what other people have done to import a sample from an already imported library.
Thank you.
import com.stfalcon.chatkit.sample.ChatSamplesListAdapter;
It happens because this class is not included in the library.
It is a sample file used as sample.
As you can see it is just a simple RecyclerView.Adapter then you can copy it in your project or you can use a own adapter.

Importing google client dependencies

I'm trying to add some YouTube OAuth2.0 authorization for an Android project I'm working on using Android Studio. I got some sample code from here http://bit.ly/1SI805S. I'm pretty sure I linked to it from a Google developers site. I'm trying to add some libraries to take care of the dependencies but it isn't recognizing them. Here are the dependencies:
import com.google.api.client.auth.oauth2.Credential;
import com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp;
import com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver;
import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow;
import com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets;
import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.json.JsonFactory;
import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.client.util.store.DataStoreFactory;
import com.google.api.client.util.store.FileDataStoreFactory;
import com.google.api.services.oauth2.Oauth2;
import com.google.api.services.oauth2.model.Tokeninfo;
import com.google.api.services.oauth2.model.Userinfoplus;
I downloaded a .jar for the com.google.api.services dependencies and that is working fine. I found the file on the Google developers site and it's google-api-services-oauth2-v2-rev103-1.21.0.jar. However, all of the api.client jars I've found are not working. I put them in the libs folder and add compile files to the build.gradle but it won't recognize the imports.
The jars I've used thus far are
google-api-client-util-1.2.3-alpha.jar
google-api-client-extensions-1.6.0-beta.jar
google-api-client-auth-1.2.3-alpha.jar
Is there anything I'm missing? I've found these files in different parts of the net. I've looked through maven repositories and I just found a site, http://www.java2s.com/Code/Jar/g/Downloadgoogleapiclientutil121alphajar.htm, but I don't know that it's helpful. There's some api.client stuff I downloaded from the Google Developers site but that doesn't look like anything I need and it doesn't resolve the dependencies.
Please follow the third apprach in my link, since your library is available online (remotely) as you see in the picture below. Android studio will recognize your dependencies if you add them in their standard ways. In general, there are three standard ways. Please read this link https://stackoverflow.com/a/35369267/5475941. In this post I explained how to import your JAR files in Android studio and I explained all possible ways step by step with screenshots. I hope it helps.
Also, check your build.gradle (Moducle: app) and make sure your remote libraries are compatible with your current SDK. For example my SDK is 23.1.0:
Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, including Java 5 (or higher) desktop (SE) and web (EE), Android, and Google App Engine.
https://github.com/google/google-http-java-client
Project metadata download:http://repo1.maven.org/maven2/com/google/http-client/google-http-client/1.16.0-rc/google-http-client-1.16.0-rc.pom
Binary download:http://repo1.maven.org/maven2/com/google/http-client/google-http-client/1.16.0-rc/google-http-client-1.16.0-rc.jar
Source download: http://repo1.maven.org/maven2/com/google/http-client/google-http-client/1.16.0-rc/google-http-client-1.16.0-rc-sources.jar
The classes that you are searching for are here:

Android Studio cannot resolve symbol utils when trying to migrate CSipSimple

I'm using CSipSimple. I followed the migration guide from Eclipse to Android Studio carefully and the only error that I am getting is
cannot resolve symbol utils
and is happening on below lines:
import com.actionbarsherlock.internal.utils.UtilityWrapper;
import com.csipsimple.R;
In build.gradle, I have added the following line:
dependencies {
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0#aar'
compile 'com.android.support:support-v4:19.0.+'
}
Does anyone know why this would be happening? Any suggestion will be of great help.
ActionBarSherlock-4.4 does not have the package utils.
Check the version that was used before migrating to Android Studio.
VenomVendor's answer already provides the reason: there's no UtilityWrapper on ActionBarSherlock. So, I'll try to provide the fix instead.
tqcenglish has a GitHub repo for Android Studio port for CSipSimple. Its readme says:
Change
/res/values/wizard_sipgate_string.xml
<string xm:lns:ns0="http://schemas.android.com/tools" /> -
<resources xmlns:ns0="http://schemas.android.com/tools"/> +
delete jni folder
add jniLibs folder and org.pjsip.pjsua to java folder
delete about quote UtilityWrapper
Reference
com.actionbarsherlock:actionbarsherlock:4.4.0#aar
This seems to give a hint of removing any reference to UtilityWrapper, including import com.actionbarsherlock.internal.utils.UtilityWrapper;. However, it might compromise something.
You're on the right path to use com.actionbarsherlock:actionbarsherlock:4.4.0#aar for the dependency.
Alternatively, I don't see any reasons why files under utils won't work outside of com.actionbarsherlock.internal package, so you should be able to copy all files from com.actionbarsherlock.internal.utils to your java folder, then replace the import statement to use the corresponding package.
If you get this error while trying to use OpenCV, import this:
import org.opencv.android.Utils;

Andengine importing error

I try integrate AndEngine Library to my project I download Lib from AndEngine , and download some extension but I find problem with multi-touch
this problem I find this importing
import org.anddev.andengine.util.SystemUtils;
I search and I find the soluation
https://gamedev.stackexchange.com/questions/48427/cant-set-up-andengine-gles2-anchorcenter-examples-extensions
I try it and it solve my problem
but I still have some problems in some imports
import org.anddev.andengine.input.touch.controller.BaseTouchController;
import org.anddev.andengine.input.touch.TouchEvent;
import org.anddev.andengine.input.touch.detector.BaseDetector;
what I missing , any one can help me
These imports are for AndEngine-GLES1, you have to use the new packages (org.andengine)

How to import APIDEMOS into my project

I am using eclipse helios.I am importing android samples.But when I am importing project it is showing message that no project is selected.Any idea.
Lazy copypasta at OP's request:
You need to import the demos into a specific project.

Categories

Resources