Android Question Compile ADP (date picker) to Library?

Discussion in 'Android Questions' started by B_FISH, Apr 17, 2015.

  1. B_FISH

    B_FISH Member Licensed User

    Have ADP project with a main module and a class module. Project worked exactly as expected.

    Compiled the class module into a library, then started a new project.

    Copied all the code from the MAIN module (of the original project) into the new project. Went to the lib tabs and checked my newly created lib.

    Tried compile and run and got the following:

    Compiling generated Java code. Error
    javac 1.7.0_80-ea
    src\b4a\example\main.java:311: error: cannot find symbol
    public b4a.example.anotherdatepicker _adp = null;
    ^
    symbol: class anotherdatepicker
    location: package b4a.example
    1 error


    I looked in the source of the main module and also the source code for the library itself. I do not see any of the above mentioned references in any of my source code.

    Am I missing something simple?

    B_FISH
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    I've just tried it and it worked.

    - Opened the AnotherDatePicker example.
    - Compiled to a library with Alt + 5.
    - Removed the module and added a reference to the new jar file.
     
  3. B_FISH

    B_FISH Member Licensed User

    BY "added a reference to the new jar file" are you meaning something more than "ticking" the box for the new library on the libs tab?

    Also, while I'm asking..... Can a new class that will become a library, use objects that are defined in another class(library)? In other words "nested" classes/libraries?

    B_FISH
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    No.

    Libraries can reference other libraries as long as there is no circular reference.

    First you compile library A.
    Then you can create a project for library B that uses library A.
     
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