Android Tutorial [java] Video tutorial - Creating a simple library

Discussion in 'Libraries developers questions' started by Erel, Nov 6, 2011.

  1. Erel

    Erel Administrator Staff Member Licensed User

    There is a new tool available for compiling libraries. It is much simpler:

    I've uploaded a video tutorial to YouTube which explains the steps required for building a library with Eclipse: Basic4android Tutorial - Creating a library - YouTube

    The doclet tool and more information are available here:

    One step is missing from the video by mistake. Exporting the project as Jar file from eclipse.
    It is done by right clicking on the project - Export:


    You should then choose jar and the default options should be good.
    ilan, mr.v and Mark Zraik like this.
  2. Erel

    Erel Administrator Staff Member Licensed User

    As this is the first video tutorial, I would be happy to hear your feedback.
  3. clx

    clx Member Licensed User

    Very helpful, thanks Erel.
  4. NJDude

    NJDude Expert Licensed User

    Very nice!.

    If I may, first, try to get the sound a little louder and maybe normalizing it to keep the same volume level and second, using this example, a more detailed explanation about what you're doing, I know is a simple multiply function but it would be helpful to know what are you doing, that would help beginners to get a better grasp.

    Video tutorials are always good even if they are simple as this one.

    Very good, thanks.
  5. stevel05

    stevel05 Expert Licensed User

    Very good Erel, great initiative. I think it's great that you encourage this open approach. I can see a surge in new libraries from users.
  6. Asmoro

    Asmoro Active Member Licensed User

    Hi Erel,

    Cool to have video tuts, another big reason to stick and enjoy with your program.
    And a big boost for beginners as well like me.

    Hopefully more will come in the future as a standard.

  7. Tom Christman

    Tom Christman Active Member Licensed User

    Even I understood the tutorial.......very enlightening!:)
  8. Gigatron

    Gigatron Member Licensed User

    Thank you Erel

    This is very very easy than how to create library article.

    Waiting the next video ... :)
  9. Erel

    Erel Administrator Staff Member Licensed User

    Thank you for releasing your first library :)
  10. tremara1

    tremara1 Active Member Licensed User


    I have not programmed in java but I watched the video and thought I would get eclipse and give it a crack. I dont think any of you have any reason to fear I might become expert but I was able to get a silly "hello world" lib up and running first go. I dont know what I can apply it to but at least I am beginning to understand what is behind all the great stuff you guys put out there for us. Thanks.
  11. bparent

    bparent Member Licensed User

    Excellent video and easy to understand and follow.

    How about doing a video on how to wrap java code and use from B4A?
  12. StevieC

    StevieC Member Licensed User

    Hi Erel,
    I've followed the video. The FirstLib.xml is written but not the .jar.

    This is the console output........

    Loading source files for package anywheresoftware.b4a.sample...
    Constructing Javadoc information...
    [-doclet, BADoclet]
    [-docletpath, C:\Users\Steve\Downloads\BADoclet]
    [-sourcepath, C:\Users\Steve\workspace\FirstLib\src]
    [-classpath, C:\Program Files (x86)\Anywhere Software\Basic4android\Libraries\Core.jar;C:\Program Files (x86)\Anywhere Software\Basic4android\Libraries\B4AShared.jar;C:\Android\android-sdk\platforms\android-8\android.jar]
    [-b4atarget, C:\Users\Steve\Downloads\FirstLib.xml]
    Working with class: anywheresoftware.b4a.sample.FirstLib
    finish: C:\Users\Steve\Downloads\FirstLib.xml
    warning: no version field.

    Any ideas?
    Last edited: Feb 23, 2012
  13. Erel

    Erel Administrator Staff Member Licensed User

  14. StevieC

    StevieC Member Licensed User

    Thanks Erel. Sorry I had missed that.

    I've taken some java code and created a library. When I try and use it in Basic4Android I get the error message:

    An Error Occured
    Error Parsing Libraries
    src.javazoom.jl.player.PlayerApplet.size already exists.

    Any idea as to how to go about solving that?
  15. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for this question.
  16. derez

    derez Expert Licensed User

    Thank you for this video, even I got it finally...
  17. stefanobusetto

    stefanobusetto Active Member Licensed User

    very useful
    i was able to create my library
    i a few minutes
  18. GiovanniPolese

    GiovanniPolese Active Member Licensed User

    Make Libs

    I just tried to make a lib, following step by step the tutorial. The final step didn't produce the xml and jar file. Actually it doesn't produce anything. The only "variant" with respect to the video example is that I downloaded the BADocLet in a folder and, instead of giving same folder as target folder for xml file, I gave another (that was of course created before). (Before sending this post, anyway, I tried with same folder, and same result). DocLet folder was copy/pasted as in video, and same for xml target folder. Unluckily I come from VisualStudio C++ programming and I am new to Eclipse and Java. I attach a zip file containing all the screen-shots. I don't figure out where is the problem and I fear it could be an obscure Eclipse, java or android installation issue..
    (note: in my folder strings "Programmi" is the equivalent of "Program Files")
  19. GiovanniPolese

    GiovanniPolese Active Member Licensed User

    Make Lib

    About my previous post:
    I saw that I was missing Export option, described in Erel's post (I went to video before reading all..). So this created the jar. But the xml is still not created..
  20. GiovanniPolese

    GiovanniPolese Active Member Licensed User

    Make lib

    Answering to my question. It seems that the reason is that I wrote DocLet and not Doclet in the Doclet class path... Now the xml appeared. Now I confirm that everything is ok.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice