Android Question Simple Library Compiler Problem compiling the library

Discussion in 'Android Questions' started by cambopad, Jul 29, 2015.

  1. cambopad

    cambopad Active Member Licensed User

    Today I tried to create a lib using Simple Library Compiler, but it shows the following error message:

    Code:
    Starting step: Compiling Java code.
    javac: invalid target release: 
    1.7
    Usage: javac <options> <source files>
    use -help 
    for a list of possible options
    My environment:

    -Simple Library Compiler 1.03
    -JDK 1.6
    -Windows 7 64 bit

    Can anyone help me?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Configure B4A to use Java 7+.
     
    cambopad likes this.
  3. cambopad

    cambopad Active Member Licensed User

    Hi @Erel ,
    Now I installed Java 7+ and configured B4A to use it, and it works fine now!

    However I face another strange problem now!

    I used this newly created lib in my project:

    1. When I compiled my project using B4A IDE. The compiled APK is working fine.

    2. But when I compiled my project using B4Abuilder. The compiled APK always crashed with the following message


    B4ABuilder.png

    This is really strange to me! :( I hope @Erel can help me with this!
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Don't limit your questions to a single member. I usually avoid answering such posts.

    Have you compiled your app in release mode when you compiled from the IDE?
     
  5. cambopad

    cambopad Active Member Licensed User

    Hi Erel! sorry for pointing this question to only you!Actually, I need all helps from the other members too :). In my case, I need to make use of B4ABuilder.

    I always compiled my app in realease mode(obfuscated) in IDE.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Can you upload the library (jar + xml)?
     
  7. cambopad

    cambopad Active Member Licensed User

    Hi @Erel I just PM you the library! Please check it!
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    I've tested it with B4A v5.02 and it worked properly when compiled with B4ABuilder.
     
    cambopad likes this.
  9. cambopad

    cambopad Active Member Licensed User

    Really? So what did I do wrong? :( Did you enable obfuscate mode when compiled with B4ABuilder?
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    Not sure.
    No.
     
    cambopad likes this.
  11. cambopad

    cambopad Active Member Licensed User

    Hi Erel,

    Now I found the root cause of this problem, however I don't know what to do to solve the problem!

    How I found the root cause:
    I used Java Decompiler (for learning purpose only) to decompile my two APKs to find the differences between them ( The first APK was compiled with B4A IDE, the other one was compiled with B4ABuilder). After comparing, I can see that the APK compiled with B4ABuilder doesn't contain the classname of my library. This problem happened when I used this library. If I don't use this library in my project, the APK compiled with B4ABuilder works just fine.

    So I can draw a conclusion that:

    B4ABuilder doesn't include my lib in the compiled APK (The other libraries work just fine except my lib)

    How can I solve this problem? :(
     
  12. Erel

    Erel Administrator Staff Member Licensed User

    Are you able to upgrade to v5? This might be a bug in previous versions. As I wrote, it did work properly when I compiled it with B4ABuilder.
     
    cambopad likes this.
  13. cambopad

    cambopad Active Member Licensed User

    I will upgrade! How much will I need to pay for the upgrade?

    One important thing I want you to note is that only this lib causes the problem with B4ABuilder. Other libs work fine with B4ABuilder.
     
  14. Erel

    Erel Administrator Staff Member Licensed User

    Please contact support@basic4ppc.com.
     
Loading...