Menu

Is an example possible for Android Studio 2.2?

Toni
2017-01-19
2017-01-23
  • Toni

    Toni - 2017-01-19

    Hello, it would be interesting to know how to use this wonderful library with Android Studio 2.2. Which is the current Android development tool. I can not use it with a new project .. Can someone help me? Thank you!

     

    Last edit: Toni 2017-01-19
  • Toni

    Toni - 2017-01-23

    Hello! I'm having trouble creating a new project with Android Studio 2.2 using Jaybird port. I get the famous error: FATAL ERROR.

     
  • Toni

    Toni - 2017-02-10

    Fixed!
    You have to change the variable gradle in the file:
    minSdkVersion = 8 (higher values do not work!)

    It's a pity, it's a very old version of the Android API.

    How could we solve it? I can help?

    Thanks!!

     
  • Christian Mayer

    Christian Mayer - 2017-02-10

    Hi,

    sadly i dropped the origin project this library was used for and havn't enough time to maintane this library. The first step would be to port this to Android Studio.

    So if you want to help, grab the code and do it :)
    Beside getting the ndk stuff to complie the real challenge is renaming some system namespaces.
    When i started the project, the android framework didn't provide the full sql namespace so i used jarjar to repackage and renamed the sql namespaces to my own classes which i have taken from apache's harmony project.
    https://github.com/shevek/jarjar

    See custom_rules.xml, which namespaces should be renamed.

    If you need some help, i really try to reply.

     
  • Toni

    Toni - 2017-02-14

    Hello!

    Thank you very much for answering.

    The first step is already achieved, your library works in Android Studio. The only thing that works if we put a version of the API <= 8. If we use a higher version of the API gives runtime errors (FATAL ERROR, described by some other user)

    If you want I can send you an example that works in Android Studio 2.2.2.

    I have experience in programming, but not much in Java and Android .. But I would like to be able to help improve this library. I'm going to study your information and anything I tell you.

    Thank you so much for everything!

     
  • Christian Mayer

    Christian Mayer - 2017-02-25

    Hi Toni,

    i think we have to recompile the library with Android Studio and a higher API-Version to make this work.
    So you can grab the code from this library and convert it to an Android Studio-Projekt.
    Just to be clear: I don't mean compile your project with the library in Android Studio, but compile this library itself with Android Studio and a higher API-Version.

    Here you can get the code for this library:
    https://sourceforge.net/p/androidjaybird/code/HEAD/tree/

     
  • Toni

    Toni - 2017-03-09

    Hi Christian,

    Thank you for your answer.

    I'm trying to compile your library with Android Studio, but I'm having a lot of problems. My main problem now is that I do not recognize these libraries:

    Import org.firebirdsql.javax.naming.Context;
    Import org.firebirdsql.javax.naming.Name;
    Import org.firebirdsql.javax.naming.RefAddr;
    Import org.firebirdsql.javax.naming.Reference;
    Import org.firebirdsql.javax.naming.spi.ObjectFactory;

    I need to know how to make the change:

    <Jarjar destfile="libs / ext.jar">
    <Zipgroupfileset dir="external" Includes="*. Jar"/>
    <Rule pattern="javax.naming **" result="org.firebirdsql.javax.naming@1"/>
    <Rule pattern="javax.resource **" result="org.firebirdsql.javax.resource@1"/>
    <! - <rule pattern="javax.sql **" result="org.firebirdsql.javax.sql@1"/>
    <Rule pattern="java.sql **" result="org.firebirdsql.java.sql@1"/> ->
    <Rule pattern="javax.transaction **" result="org.firebirdsql.javax.transaction@1"/>
    <Rule pattern="javax.sql.XA **" result="org.firebirdsql.javax.sql.XA@1"/>

    To the script format of build.grandle that uses Android Studio ..

    You can help? Thank you!

     

    Last edit: Toni 2017-03-09
  • Christian Mayer

    Christian Mayer - 2017-03-11

    Hi Toni,

    we have to use jarjar to "rename" that namespaces.
    Here you can find how you can use jarjar with gradle:
    https://github.com/shevek/jarjar

    Hope it helps.

     

    Last edit: Christian Mayer 2017-03-12
  • Toni

    Toni - 2017-03-13

    Hi, christian! I'm looking at it .. but I can not solve it. Java & Android is a new world for me, I have always programmed in win32 & C ++, Basci, C #.

    Thank you very much for your help, I'm still trying.

     
  • Christian Mayer

    Christian Mayer - 2017-03-17

    Hi,

    well, i spend my friday afternoon for you guys and moved the library over to Android Studio.
    Toni can you please test the attached library.

    Regards

    Christian

     

    Last edit: Christian Mayer 2017-03-18
  • Toni

    Toni - 2017-03-21

    Hi, christian!

    First of all, thank you very much for your help and your effort. I tried to try the package you sent me, but I could not. Is this the library to compile it? Or is it the library to use in the final application?

    I have not been able to use it in one way or another ...

    Thank you very much and greetings!

     
  • Toni

    Toni - 2017-03-22

    Hi, christian!

    I have read the 2 web pages with the information about the jar / aar libraries. In theory it is very easy, but in practice I have not been able to compile the project without errors.

    Look at the error that tells me Android Studio 2.2.2

    Error:Project app: Only Jar-type local dependencies are supported. Cannot handle: D:\Proyectos\ClientFirebirdExample4\app\libs\androidjaybird-debug.aar

    I tried with an application example that worked with the previous library and it was tested with a new application example, but it does not let me compile with the .aar file. So far I have not had problems using libraries .jar, I feel stupid.

    I thank you very much for your help, and you will tell me how I can compensate you.

    Thank you very much again. regards!

     
  • Christian Mayer

    Christian Mayer - 2017-03-26

    Hi Toni,

    i have updated the example in the download area.
    Basically you have to go to File -> Project Structure and klick the green add sign in the upper left.
    Then choose "Import .JAR/.AAR Package" and select the aar file.
    After that in the group area select app and go to Dependencies.
    Here klick the green add sign in the upper right a choose "Module Dependencies"
    If that doesn't work please use the provided example.

     
  • Toni

    Toni - 2017-03-31

    Hi, christian!

    I tested the example and if that worked for me. I had to update the Android Studio version 2.3. Now it already works with current API levels;) I will continue testing and anything else will tell you.

    Very thankful! Great job!

     
  • Andrew Kipcharskiy

    Hi, Cristian!

    We have project with DB on Firebird on the server and win32 clients and Sqlite db on Android devices and we interesting in migrating Android app to Embeded Firebird DataBase.

    Thanks a lot for the library. Could you please say if I can use it with embeded database on android device and how?

     

Log in to post a comment.