Adding Box2d extension to Android Studio - android

Downloaded Box2d from here but after going
Project Structure > New Module > Import existing library
When asking for path i put the box2d path and still get the warning that doesnt let me continue
Select modules to import
What is the problem?

Don't add PhysicsBox2D as Module, Download the JAR From this link :-http://www.java2s.com/Code/Jar/o/Downloadorgandengineextensionphysicsbox2djar.htm
and copy jar and paste in project library folder.
And then go to File->Project Structure-> app->dependencies-> + ->File Dependency -> lib ->add that jar file.
And if want to check that box2D is added or not try to import that:-
import org.andengine.extension.physics.box2d
in MainActivity.java. If importing Box2D is set in Project.

Related

Importing android-crop library in my project

In my app I want to implement android-crop library: https://github.com/jdamcd/android-crop
I'm using eclipse. I have installed gradle plugin , but I'm new in gradle and I don't now how to import this library in my project and use it. When I import this library I get project like on image, but I can't launch this example application.
Can some one tell me how to import library in my project and how to use it.
Thanks
If you are using Eclipse you should:
clone the repo locally
import the code in your workspace starting from lib folder. The Wizard will import the code in lib/src/main. I suggest you naming it "croplib" (or another name) instead of "main".
mark java(*) folder as source (click on folder -> Build-Path -> use as source folder).
mark croplib as Android Library (Properties -> Android -> Is library)
Clean and build
I suggest you switching to Android Studio.
In this case, just open your project and add this dependency to your build.gradle file.
compile 'com.soundcloud.android:android-crop:0.9.10#aar'

Is it possible to import only the jar files of a library project. For example: Aviary, telerik, facebook

Is it possible to import only the jar files of a library project. For example: Aviary, telerik etc.
I am using the above features in my project. While i have done the samples i have to import the SDK projects into our workspace. Can we import only the jar files into our projects and use the above features in our app?
You can copy those jar from a library project to your lib
or
Right click on project-> properties -> java build path -> add jar -> project source lib project->lib->select jar ->ok->ok.
Hi #Jafeena for facebook 3.14 this is not allowed.
whats the problem, why not to add all of them as a library, if problem is related to same name then change library name with Eclipse->refractor functionality and use them as your library.

Android bitcoin implementation containing errors, how to resolve it?

I am working on a currency wallet app. I have downloaded code from here.
I have imported this code in my eclipse, also i have inserted some libs(.jar files). I have downloaded maven code for java from here.
Now in android project in eclipse there are some compile time errors found like.
The import com.google.bitcoin.params cannot be resolved
and so on.
So please can anybody help me to build bitcoin project without error ?
Where to found following packges and How to import following packages ?
**The import javax.annotation cannot be resolved
The import org.slf4j cannot be resolved
The import com.google cannot be resolved
The import de.schildbach.wallet_test.R cannot be resolved
The import org.bitcoinj cannot be resolved
The import ch cannot be resolved`enter code here`
The import org.spongycastle cannot be resolved**
Thank you in advance.
You need to get each of those libraries and add them to your project:
Put the JAR file in the /libs folder in the root of your project (create the libs folder if it doesn't exist)
If necessary, right-click the JAR file and select Build Path → Add to Build Path
If necessary, clean the project (Project → Clean)
For javax.annotation, for example, you would use this libarary:
http://mvnrepository.com/artifact/com.google.code.findbugs/jsr305
Just click the latest version number and then click Download.
If you have a dependency that you can't find a JAR file for, you can download the source and add that project as a library dependency for your project: https://stackoverflow.com/a/8281477/399105
More resources:
Adding libraries without resources
Adding a library/JAR to an Eclipse Android project
Android: The import javax.annotation cannot be resolved

How to import an existing Android Library project into Eclipse workspace

I see there are powerful support projects out there like this one: https://github.com/JakeWharton/Android-ViewPagerIndicator
All the tutorials and posts I have found describe:
what an Android Library Project is
how to create one from scratch
how to reference one after it's already in your Eclipse workspace
But I haven't found the correct steps for how to do an import into eclipse for such a project.
I have tried to create an empty Android library project and then copy over the files; and then also tried to link to the library project root folder in the eclipse project config for another empty project. Those didn't work.
So my question is .. what's the correct way to import the ViewPagerIndicator project into my Eclipse workspace?
Thanks
Right click on Workspace - > Import -> Existing Android Code Into Workspace -> Library Folder
Note:
To avoid other inconveniences, do this:
1) Once is already in your Workspace, make sure that the project is marked as "Library." Right click on Library -> properties -> Android -> Check Is Library
2) At the time of importing, change the name of the folder. Please, specify something different than just "library". Projects on github usually come that way.
3) Make sure that every file is in the folder. For instance, Eclipse won't import anything if project.properties is not inside the Library folder. In a similar situation, Eclipse could import the project, but it would not create the R.java file if something is missing or there are errors in the layouts of the library.
4) Make sure that all dependencies match with your project. For instance, if certain library needs android-support-v4.jar, make sure that both (project and library) share the same version of the file. Once again properties -> Java Build Path -> Libraries -> Add or remove Jars
5) To make your project dependent of the imported library, Right Click on the project -> properties -> Android -> scroll until the end and add the imported library.

import a library into my project

I made a project and I want to use the slideMenu library but when I import it the package.R class will be undefined because the attr.xml that found in library res/values. like import offers.findme.com.R;
Try this ...
Once you download the file from site you mentioned and extract it to a given destination, all you have to do (if you're using Eclipse) is
File-->import-->Android-->Existing Android into Workspace , and select that
library location.
And to use it in your projects go to
properties>Android and add the new library.
Hope this helps...
if you use eclipse then start a new project say projectLib from library source
and then configure the build path of the project to include the projectLib and rember to export i with the app
alternatively you could copy the source and resources of your library to your project and instead of offers.findme.com.R look up for your.project.R
You should refer your library project in your android project.
import library project into your workspace and into eclipse.
Right click on your android project. goto properties. Choose android. Click add browse the library project and add the same.
Now clean and build.
For more info check the link below. The link has snap shots if you scroll down
http://developer.android.com/tools/projects/projects-eclipse.html
First you need to import the library as an Android Project.
Then you need to set it as your project's library, by Right-Click your project directory > Properties
There you can mark the library project as your project's library.
After that, Project > Clean your project.
The README file says the steps clearly.
Regards.
There are a invalid line in style.xml that prevent me to access the new library the line was id property

Categories

Resources