Android Question Compiled library don't found

Discussion in 'Android Questions' started by imgsimonebiliato, Apr 3, 2015.

  1. imgsimonebiliato

    imgsimonebiliato Well-Known Member Licensed User

    Hello,
    I used "Compile to library" to create a personal library that contains 5 different code modules and a service module.

    The compilation it's ok, but if I use this library named "bsUtils" (package name: simone.b.bsUtils), I've got this error:

    Code:
    Parsing code.                           0.02
    Running custom action.                  
    0.03
    Compiling code.                         
    0.05
    Compiling layouts code.                 
    0.05
    Generating R 
    file.                      0.06
    Compiling generated Java code.          Error
    javac 
    1.7.0_75
    src\simone\b\fortitudovedelago\bsfortitudovedelago.java:
    14: error: package simone.b.bsUtils does not exist
    public simone.b.bsUtils.bsconnection _bsconnection = null;
                           ^
    1 error
    Please, help
     
  2. klaus

    klaus Expert Licensed User

    In the Main module you should set following properties in #Region Project Attributes :
    #LibraryName: MyLibrary
    #LibraryAuthor: MyName
    #LibraryVersion: 1.0

    The library name will be MyLibrary and saved in the AdditionalLibraries folder.
     
    Peter Simpson likes this.
  3. imgsimonebiliato

    imgsimonebiliato Well-Known Member Licensed User

    Hello,
    I already set this before compile:

    Code:
    #Region  Project Attributes
        
    #LibraryVersion: 1.00
        
    #LibraryAuthor: Simone Biliato
        
    #LibraryName: bsUtils
    #End Region
     
  4. klaus

    klaus Expert Licensed User

    You need to give more information.
    Whithout knowing more in detail what you are doing it's difficult to give a concrete advice.
    When and in what line do you get the error ?
    What are the names of the modules in your library ?
    How do you initialize them ?
    You might have a look at chapter 11.7 Compile a class into a Library in the B4A User's Guide.
     
    NJDude and Peter Simpson like this.
  5. imgsimonebiliato

    imgsimonebiliato Well-Known Member Licensed User

    Here it is the project structure

    [​IMG]

    I get this error, in another app, that use the bsUtils library.
    I don't need to initialize the libraries
     
  6. klaus

    klaus Expert Licensed User

    Again the same questions.
    - When and in what line do you get the error ?
    - What are the names of the modules in your library ?
    - How do you initialize them ?
     
    thedesolatesoul and NJDude like this.
  7. imgsimonebiliato

    imgsimonebiliato Well-Known Member Licensed User

    - I get the error when I run the app. It isn't specified the line
    - The name of the modules are: bsConnection, bPushNotify, PushService, bsDimensions, bsShortcut
    - I don't initialize the library because I don't need it
     
  8. klaus

    klaus Expert Licensed User

    In the first post you say:
    Now you say:
    Sorry, but I don't understand !!!

    As I don't know nor understand what you want to do and what you are doing I can't help.
     
    thedesolatesoul and NJDude like this.
  9. imgsimonebiliato

    imgsimonebiliato Well-Known Member Licensed User

    I mean that, I don't need to initialize the library
     
  10. klaus

    klaus Expert Licensed User

    You must post a small project showing the problem.
    Without seeing in detail what you have done it's almost impossible to help.
    I have compiled several classes and code modules to libraries without any trouble.
     
    thedesolatesoul and NJDude like this.
  11. imgsimonebiliato

    imgsimonebiliato Well-Known Member Licensed User

    I found the problem...
    B4A compiled the library to a different "Additional library" folder
     
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