I am very new to Android development. I am not using gradle. I want to use the following library
Can you please let me know how to include in my project.
When I clone your project to eclipse(Mars) it is showing the following structure-
My project structure is given below.
Now shall I copy the "lib" folder (lib\src\main...) to my "src" folder?
Normally I add the library like the following way-
Just import the lib folder of the library instead of the whole library in Eclipse. And add it as a library to your project.
Related
I had downloaded the Android Studio 4.0.1 and the same version for OpenCV Library.
I made a random Java project just to set the library, but when I select the library (the path is correct -"C:\opencv-4.0.1-android-sdk\OpenCV-android-sdk\sdk\java") they don't show it and let me finish this action (please see the image below).
Why I can't select the library? I am watching an Youtube video for this (beginner here) and the guy can see it totally different.
You don't need to select library. Add this module then do this steps:
Open Project Structure-> Dependencies-> app -> Add module dependency-> select opencv module.
You can access opencv classes right now.
For me the import project functionality also doesn't work, but what worked is to create a new empty project, clears its artifacts, and copy the OpenCV library artifacts from OpenCV-android-sdk\sdk\java\ folder. There are 6 steps:
copy AndroidManifest.xml to src/main
copy sources to src/main/java
copy res folder to src/main
copy libs folder from OpenCV-android-sdk\sdk\native\libs to src/main and rename it to jniLibs
create folder src\main\aidl and move file src\main\java\org\opencv\engine\OpenCVEngineInterface.aidl to folder src\main\aidl\org\opencv\engine\
in build.gradle set project as library by specifying plugins { id 'com.android.library'}
You can refer to the image in order to see the final project tree:
project structure image
I'm trying to add https://github.com/astuetz/PagerSlidingTabStrip to my project. Looking at it, I notice that it has files in res and depends on its own R.java file. When I make it a JAR I continue to get errors because the dependencies aren't all there. I'm not sure how to get this to work.
I keep getting errors like
import android.support cannot be resolved and everything else too. I tried referencing different answers on StackOverflow but none of them yielded a working solution.
The resources won't be packaged into the JAR file. Google is working on a new packaging scheme called AAR which is supported by Android Studio.
In order to use this third-party library in your own project, you should clone it to a local repo. Then you can import it directly into your Eclipse workspace and then add the Eclipse project to the classpath of your app's project.
Download the whole source code from https://github.com/astuetz/PagerSlidingTabStrip by git tool.
On your Eclipse IDE, import the library as exsisting source code at Android option.
Add the library your add before into your project.
I'm new to using GitHub and I need to build the latest project from https://github.com/TantalumMobile/Tantalum but I don't know what to do with the zip I downloaded from the site.
What I got after extracting from this zip was a Tantalum-Master folder and inside the same layout as the project in GitHub but if I try to import this folder into Eclipse then I get the example projects imported and not the project with the classes I'm interested.
Do I have to reference somehow project like in Visual Studio? How do I build the jar? Do I have to paste the source folder into my project? Does Eclipse needs a plugin to use this kind of projects? Do I need a specific IDE to build this kind of project?
I want to create a GridView like GooglePlay.
I found this library on Github. I don't exactly know how to include it to my project. I tried to add it in "Build Path", but it doesn't work.
Is it possible to export it as a jar file?
You will have to import library directory as a project in your Eclipse just like #ssantos said in the answer. However you have to do one extra thing to make it work.
All the code is in a sub folder called "java". You have to right click on it and make it as source folder.
For more information you can look at the official guidlines https://github.com/gabrielemariotti/cardslib/blob/master/doc/BUILD.md
It seems you can find the library project here.-
https://github.com/gabrielemariotti/cardslib/tree/master/library/src/main
I'd try importing that as a project in your workspace (and mark it as Android library), and then including it in your project Android libraries (Project properties => Android => Library section)
If you're using Android Studio, just add the following to your build.gradle file.
dependencies {
compile 'com.github.gabrielemariotti.cards:library:1.3.0'
}
I am now going to use the .jar file on http://code.google.com/p/google-api-translate-java/. However, after I download it, I tried to import it in my current project folder (in Eclipse)
the two import statements
import com.google.api.translate.Language;
import com.google.api.translate.Translate;
always get complained by the compiler saying couln't find such class
Could any one help on how to correctly import this .jar file into a project in Eclipse?
You need to add it to your build path. Right-click on the project in Project View, select Build Path->Configure Build Path, then Libraries tab. Now, use one of available options there to add a JAR.
Use "Add JAR" if you copied the jar to your project folder or "Add External JARs" to add it by poiting to a path in filesystem. (Anyway, it is better to copy the jar to the project folder, in which you want to use the jar).
HTH
see How to import class into existing Java project, with Eclipse
Copy the google-api-translate-java-0.92.jar file to your project /WEB-INF/lib/ folder and refresh your project (right click on project and select "refresh").
Google Translate API v1 is deprectaed and will shutdown soon.
You can use Google Translate API v2 Java. It has a core module that you can call from your Java code and also a command line interface module.
Hy I have faced the same issue and fixed it
Step1: download google-translate-api jar file
step2: paste into your app library file
step3: Goto project structure > app > select dependencies -> then add path of your jar file...
Enjoy now you can acess google api services