Android Question b4x to eclipse

Discussion in 'Android Questions' started by ilan, May 11, 2015.

  1. ilan

    ilan Expert Licensed User

    Can i open my b4a app in eclipse and run it from there? I know i saw a thread that talks about it but could not do it by myself. Got lots of anywhere error in my eclipse project. Can someone explain how to do it please. A client wants the source code in eclipse unless he wont buy it.

    Thank you
     
    Peter Simpson likes this.
  2. Erel

    Erel Administrator Staff Member Licensed User

    The Java source code is available under the objects folder. You need to add references to the libraries in the project.

    Note that without a B4A license he is not allowed to use the core libraries.
     
  3. ilan

    ilan Expert Licensed User

    Ok i understand, so it is not possible to sell a source code or can i include a b4a license in the price buy from you a license and sell him the source, is this possible?

    If i dont use any libs still need to add references? And how do i add references, sorry for my ignorance i just dont know java and have no experience with eclipse

    Thank you
     
    Peter Simpson likes this.
  4. Erel

    Erel Administrator Staff Member Licensed User

    Yes. There are always two jars referenced (Core.jar and B4AShared.jar).
    Yes, it is possible.

    Right click on the project - Build Path - Configure - Libraries - Add JARs.
     
    Peter Simpson and ilan like this.
  5. ilan

    ilan Expert Licensed User

    Thank you :)
     
    Peter Simpson likes this.
  6. Peter Simpson

    Peter Simpson Expert Licensed User

    That's a really good question you asked @ilan.
    So @Erel I presume that I could in theory do the same as ILan but using Android Studio? Thank you
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    Yes. It should work with Android Studio as well.
     
  8. ilan

    ilan Expert Licensed User

    After importing the project and adding the external jars i see about 100 warnings. I guess thats not impotent but when i try to run its the app crashes on the simulator.

    Should it run on the simulator? Like it does in b4a?
     
  9. Peter Simpson

    Peter Simpson Expert Licensed User

    Did you manage to fix all the warning messages @ilan?
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    Yes.
     
  11. ilan

    ilan Expert Licensed User

    No.. :(

    well in b4a it works fantastic but in eclipse i got this error:

    what could be the reason??
     
  12. Erel

    Erel Administrator Staff Member Licensed User

    Hard to say. Try to create a new Android project in Eclipse and then add your code and the libraries to the new project.
     
  13. warwound

    warwound Expert Licensed User

    @ilan

    Is your 'main' Activity class declared in the manifest - with the necessary launcher intent filter?
     
    thedesolatesoul likes this.
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