Java Question .:Create Basic4Android Libraries:.

Acuario

Active Member
Licensed User
Longtime User
- For the XML File:

In Eclipse, go to Project > Generate Javadoc. Again a new window will popup saying “Generate Javadoc.” In javadoc command: locate your javadoc.exe. mine is: C:\Program Files (x86)\Java\jdk1.6.0_21\bin\javadoc.exe. Make sure you select the right one and don’t just copy mine.
Next check the checkbox next to the library you want to convert. Visibility: public and select the radiobutton saying: use custom doclet. Doclet Name: “B4ADoclet” and Doclet class path: “C:\Program Files (x86)\Anywhere Software\Doclet“ both without the quotes. Remember that the path may be different from yours.


B4ADoclet should be BADoclet !!
 

aedwall

Active Member
Licensed User
Longtime User
I. Introduction.

import anywheresoftware.b4a.BA.Author;
import anywheresoftware.b4a.BA.Permissions;
import anywheresoftware.b4a.BA.ShortName;
import anywheresoftware.b4a.BA.Version;

XverhelstX

Can you tell me why you use "anywheresoftware.b4a." in the above import statements? Where does this info come from and what should I use in my library code? When I try the above, Eclipse flags errors and will not make the .xml; files.
 

barx

Well-Known Member
Licensed User
Longtime User
How come on this tutorial you use

B4X:
import anywheresoftware.b4a.BA.Author;
import anywheresoftware.b4a.BA.Permissions;
import anywheresoftware.b4a.BA.ShortName;
import anywheresoftware.b4a.BA.Version;

but on Erel's he doesn't?

Just confusing me a little. Needed or not?

Cheers
 

barx

Well-Known Member
Licensed User
Longtime User
I must have done something to Eclipse. All I tried to do was add a new (2nd) project and now whenever I right-click on the project name and go to build path the only option I get is 'Configure Build Path'.

Any ideas what I have done. lol
 

tmighty

Member
Licensed User
Longtime User
Turning Speexdroid into b4a lib

Hello!

I wanted to turn the Speexdroid lib into a b4a lib.
I am not sure if I can/should follow the instructions here, or if I need to start differently.

I have downloaded the trunk from
speexdroid - Revision 22: /trunk
using Tortoise svn.

I have then opened up Eclipse and chose "File->Import...".
I selected "General"->"Existing Projects into Workspace".

This worked fine so far, except a red exclamation mark on "Vbr.java".

Could anybody please give me a push into the right direction?
I am not sure what should be done next.

Thank you very much!
 

digitalbeat

Member
Licensed User
Longtime User
Library Wrapper - proper tutorial

I'll echo the request for Speexdroid lib (or ANY) library. I've created B4a libraries without any problem, but can't seem to find a simple example that show a simple jar file being 'wrapped' although I have seen several requests for this info and YES I've seen the library creation tutorials and the ADMOB reference and I'm still not getting it. So a simple jar file with a couple of classes and the code for the wrapper and the (static read only XML?) and an example invocation from B4A? Pretty please :)
-Thanks
 

netchicken

Active Member
Licensed User
Longtime User
Whoa, that's exactly why I was reading this thread. Someone asked me that after they created the jar, how did they get it to become an accessible library in B4A. A paint by numbers instruction tutorial for people not versed in xml or whatever needs done would be excellent.

I'll echo the request for Speexdroid lib (or ANY) library. I've created B4a libraries without any problem, but can't seem to find a simple example that show a simple jar file being 'wrapped' although I have seen several requests for this info and YES I've seen the library creation tutorials and the ADMOB reference and I'm still not getting it. So a simple jar file with a couple of classes and the code for the wrapper and the (static read only XML?) and an example invocation from B4A? Pretty please :)
-Thanks
 

invaderwt

Member
Licensed User
Longtime User
Hi .
I have one problem with one class of my library.
Inside of eclipse the class work fine but when i put in the b4a the class doesn´t work. what Can I do to resolve?
I didn´t use any @return or @param
I have Try Catch
But I really doesn´t understood what was happen.
How Can i debbug this?
Because I only tried Do
Dim test as XMLPodCast
I try run the b4a stop.
 

cmastran

Member
Licensed User
Longtime User
Problem generating jar file with ported java library

Hello,

I am trying to port a java library that has many classes. After painfully annotating all classes with the @Shortname("someclass") for all classes,
I followed the Doclet commands given in the video tutorial for generating the xml and .jar files. The procedure only generates the xml file, not the jar file. What am I doing wrong ? Please help. Where is my jar file ?

Thank You




Thank you for sharing your knowledge.

You will need to first download the custom Doclet from this tutorial: http://www.b4x.com/forum/additional...es/6810-creating-libraries-basic4android.html

Working inside C:\Program Files may cause all kinds of permissions problems. Usually it is better to work in some other path.
 
Top