B4A Library [Tool] Simple Library Compiler - Build libraries without Eclipse

Discussion in 'Additional libraries, classes and official updates' started by Erel, Jun 4, 2013.

Thread Status:
Not open for further replies.
  1. Erel

    Erel Administrator Staff Member Licensed User

    Update the exe file with the one attached.
     

    Attached Files:

    somed3v3loper likes this.
  2. somed3v3loper

    somed3v3loper Well-Known Member Licensed User

    Thanks a lot now it has 31 warnings :D
     
  3. fishwolf

    fishwolf Active Member Licensed User

    I have compile the library sample "FirstLib", tool add library to B4J librarries folder and B4J see this library.

    How to i can use the library (single method add)?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for this question.
     
  5. somed3v3loper

    somed3v3loper Well-Known Member Licensed User

    Erel , can you please add a recent menu so we can load last worked-on projects data (Project Folder ,Library Name , and b4ignore ) fields easily ?
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    SLC can be run from the command line. You can create batch files to automate it.
     
  7. somed3v3loper

    somed3v3loper Well-Known Member Licensed User

    Sorry for asking too much
    Can we pass b4ignore too ?
    Also Should we pass it directly like librarycompiler "C:\Users\user\Desktop\libswrapping\twitter4j" "SMMTwitter4J" ?
    Thanks in advance
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    No. But it shouldn't matter. Set it once with all the prefixes required.

    The first parameter is the library name and the second if the project path.
     
  9. somed3v3loper

    somed3v3loper Well-Known Member Licensed User

    Thanks a lot but I am switching between different libraries and every library has a different b4ignore data .
     
  10. DonManfred

    DonManfred Expert Licensed User

    Myb4aignore list is about 2kb of prefixes :D

    For every new wrap one more will be added
     
  11. rbirago

    rbirago Member Licensed User

    I need to develop some wrappers so I started to inspect all the online docs.
    First of all I followed the good YouTube tutorial



    that explains step-by-step how to create a simple library.

    All was ok, but...when I run the B4A test program (the same few lines of the tutorial) it gives me this error:

    B4A version: 6.00
    Parsing code. (0.00s)
    Compiling code. (0.06s)
    Compiling layouts code. (0.01s)
    Organizing libraries. (0.00s)
    Generating R file. (0.67s)
    Compiling debugger engine code. (1.48s)
    Compiling generated Java code. (1.68s)
    Convert byte code - optimized dex. Error
    UNEXPECTED TOP-LEVEL EXCEPTION:
    com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
    at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
    at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
    at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
    at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
    at com.android.dx.command.dexer.Main.processClass(Main.java:598)
    at com.android.dx.command.dexer.Main.processFileBytes(Main.java:570)
    at com.android.dx.command.dexer.Main.access$2(Main.java:546)
    at com.android.dx.command.dexer.Main$2.processFileBytes(Main.java:514)
    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
    ...while parsing anywheresoftware/b4a/sample/FirstLib2.class
    1 error; aborting

    Any suggestion?

    Thank you

    P.S: Using B4A 6.0 , Java JDK 1.8.0_91 and platform Android-23
     
  12. DonManfred

    DonManfred Expert Licensed User

    MarcoRome likes this.
  13. somed3v3loper

    somed3v3loper Well-Known Member Licensed User

    I delete b4ignore list for every project :D
     
  14. pxpto

    pxpto Member Licensed User

    I need to compile my library with Java 6.

    I've read a post from Erel suggesting to configure B4A to use Java 6 and set "-b4aignore aaa -target 1.6". When I do that I get an error. It's still looking for Java 7:

    upload_2016-10-14_9-59-55.png

    Could someone help me please?
     

    Attached Files:

  15. pxpto

    pxpto Member Licensed User

    Maybe if I try with a previous version of SLC.. Does anyone have SLC 1.01?
     
  16. pxpto

    pxpto Member Licensed User

    Found SLC 1.01 online and was able to compile my library with Java 6.
     
  17. SNOUHyhQs2

    SNOUHyhQs2 Member Licensed User

    @Erel is it possible if i could get the source code of this SLC?..
     
  18. Erel

    Erel Administrator Staff Member Licensed User

    No. Sorry.
     
  19. SNOUHyhQs2

    SNOUHyhQs2 Member Licensed User

    whats the argument for -ignore?
     
  20. Erel

    Erel Administrator Staff Member Licensed User

    It uses the last set ignore value. Note that there is no reason to change the ignore field for different projects.
     
Thread Status:
Not open for further replies.
Loading...
  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