Android Question v7.30 worked with my library, but v7.80 does not

aedwall

Active Member
Licensed User
Longtime User
In another thread, I wrote: "I mean that with v7.80, one of my libraries does not work properly - I don't know why."

Erel responded: "There is no reason to use v7.30. You should post the error you get.".

Here is the error I get when I try to run my source code in v7.80 (v7.30 works fine):

ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. (0.03s)
Organizing libraries. (0.00s)
Generating R file. (0.13s)
Compiling generated Java code. Error
javac 1.8.0_66
C:\Program Files XP\b4A_v780\Libraries_added\se_v201.jar(swisseph/SwissEph.java):1789: error: unmappable character for encoding UTF-8
* @param lapse_rate (dattemp/dgeoalt) = [??K/m]
^
1 error

This is why I had to go back to v7.30.
 

aedwall

Active Member
Licensed User
Longtime User
I made a library for the Swiss ephemeris. The library works fine as is using b4A, v7.30. I installed b4A, v7.80 in a separate folder. This same library with no changes made to it does not work using v7.80 - but it works using v7.30. There is something different between these two versions of b4A that causes an error. To be honest, I don't remember how I made the library, but it works (with v7.30) - maybe I used Eclipse, which I have since deleted. SwissEph.java is a file that was used in the making of the library. I'm not that familiar with Java code. Maybe I can unzip the .jar file, edit the line, and "re-Zip" it and it will work. I will try that.
 
Upvote 0

aedwall

Active Member
Licensed User
Longtime User
Here's the problem and the solution. B4A, v7.30 had no problem with my source code code, some whose characters were in UTF-8 format. But B4A, v7.80 cannot handle UTF-8 characters in the source code, even if those characters are in comments. Why this is so, I cannot imagine. When I unzipped the .jar file and made changes in the .java files that contained the UTF-8 characters, then zipped up the files into a new .jar file (using 7-Zip), then b4A compiled my library and seems to be working. So, Erel, are you aware that v7.30 could handle UTF-8 characters in the compiling, but v7.80 cannot? Thank you for all you do.
 
Upvote 0

aedwall

Active Member
Licensed User
Longtime User
I've already asked you twice about the Java version and you haven't answered it. It is impossible to help you like this.
Java comments are removed when you compile the code. I really don't understand what you did.

Please tell me where to look for the Java version you want to know about.

I have this: C:\Program Files XP\Java\jdk1.8.0_66\bin\javac.exe

Java comments may be removed in the compile code, but that does not prevent them from screwing up the compile process itself. That is what I saw. When a comment in the .java file causes an error in b4A so that it won't compile, then I removed that comment and it works, that proves what I am saying.

Example, with this comment in the source code: * SE_SIDM_SS_REVATI (SS, Revati/zePsc at polar long. 359Âø50').

b4A would not compile my project. When I changed the code to this: * SE_SIDM_SS_REVATI (SS, Revati/zePsc at polar long. 359d50m').

there was no longer an error.

If you want, I can send you the "before" files and the "after files". There were 5 files that needed changing. When using these same files in b4A, v7.30 there were no compilations errors (even with the UTF-8 characters present). But when using b4A, v7.80 there were compile errors until I changed all the UTF-8 characters found in the 5 source code .java files.

I attach the two different versions.
 

Attachments

  • removed UTF8 characters.zip
    125.8 KB · Views: 159
  • with UTF8 characters.zip
    125.9 KB · Views: 133
Upvote 0

aedwall

Active Member
Licensed User
Longtime User
Are you using the same Java version?

I have this in both v7.30 and v7.80: C:\Program Files XP\Java\jdk1.8.0_66\bin\javac.exe

Does this answer your question? If not, please tell me where to look for the info you requested.
 
Upvote 0

aedwall

Active Member
Licensed User
Longtime User
C:\Program Files XP\Java\jdk1.8.0_66\bin\javac.exe

I take the .jar file that worked with v7.30 and unzip it - it is full of .java files. I make my text editor corrections to 5 .java files that have UTF-8 characters, removing all references to those UTF-8 characters, then rezip the files into a .jar file with the same name. It compiles with my changes. But I did not have to do any modifications with v7.30, only with v7.80. Apparently v7.80 cannot handle UTF-8 characters like v7.30 can.
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
Mercy.

aedwall, I understand that you are not happy, but please let Erel understand your problem and sort it. There can be bug in B4X, but believe me, he is trying to solve your problem and we request you to just cooperate with him and not get angry.

Regards,

Anand
 
Upvote 0

aedwall

Active Member
Licensed User
Longtime User
I have given all the details of the situation. I have provided the source code for the 5 .java files which needed to be modified. I have stated what it took to fix the problem. Those are the facts. If no one wants to understand further, then that is fine. I found my solution. I present all this so that someone else might find their solution if they run into the same issue.
 
Upvote 0

aedwall

Active Member
Licensed User
Longtime User
Attached is the SE_v201 .jar file that compiles with b4A, v7.30, but generates errors and will not compile with b4A, v7.80, for those who might wish to investigate. Well, I tried to upload it, but it tells me the file is too large (541,684 bytes).

The bottom line is that I now have a working version and I need to move on and be productive again. Thank you to all.
 
Last edited:
Upvote 0
Top