Java Question Library Problem

Harris

Expert
Licensed User
Longtime User
I good friend has proceeded to wrap an external jar for me - greatly needed for my project. It uses three files: VehicleSerial.jar, VehicleSerial.xml and vehicle-serial.jar (the one being wrapped).

Attached is the result.apk which is 450 kb in size from the demo project when HE compiles it (Win 7). Works fine - no issue.

Also attached is the testbt.apk (136 kb) when I compile it (Win XP).

When I run my test example, I get a class not found error - due to the fact that the DependsOn (vehicle-serial) jar did not get included in the resulting apk...

I have tried compiling on two different machines and get the same result...
All files are correctly placed, in the Additional Libs folder, we have tried using different javac (1.6 and 1.7), different android.jar (version 8 and 14) yet nothing seems to help.

I have not had this issue with any other wrapped libs and find it very confounding.

Sample project attached (testbk.zip). The resulting apk should be 450 kb when compiled. It actually won't do anything for you since it needs to connect to a Bluetooth device I have.

ANY help or suggestions are most welcome.

Thanks
Harris
 

Attachments

  • result.apk
    449.6 KB · Views: 226
  • testbt.apk
    135.2 KB · Views: 220
  • testbk.zip
    7.3 KB · Views: 233
  • vehicle-serial.zip
    508.7 KB · Views: 209
  • Additional Libs.zip
    39.1 KB · Views: 239

Harris

Expert
Licensed User
Longtime User
Actually sorry its there in the xml but not in the jar. Let me retrace.

Edit: My bad. The wrapper looks fine.

Compiled to 450K for me.

Are you sure your apk is actually compiling? Can you check the timestamp?

Son of a Gun...!! Just like who created it! - 450 kb

Yes, it is compiling... Time stamp of compiled APK is now... each time. What OS are you using?
This makes no sense what so ever. Something so simple can go so sideways... Just my luck. The more you need something - the more difficult it shall be...

Thanks for you response TDS... but now what? Generally, this is never an issue.
Anybody got an XP they can compile it on?
Maybe I need to buy a Win 7 computer where it does work each time - or install a Win 7 Virtual.

What does anyone suggest? I am so lost... and desperate.
 

Harris

Expert
Licensed User
Longtime User
Using 3.80

File size is 521 kb for vehicle-serial.jar

Deleted file in objects folder - compile creates new ones each time... (without the required jar unfortunately).

Looks like it is an Win XP thing.... Win 7 and now 8 correctly produce the apk???

Anyone have XP to confirm this?

Thanks

Harris
 

Harris

Expert
Licensed User
Longtime User
Ok, I tried it all on a virtual Win 7 machine my friend setup. Exact same project compiles fine!

Off to Future Shop to invest in a modern Win 8 laptop. Can't waste anymore time with my mis-behaving XP machine - although this is the first time it has ever let me down... and hard to believe it is the cause.

My next post will be to announce much JOY - after I finally locate the start button on the Win 8...:(

Thanks
 

thedesolatesoul

Expert
Licensed User
Longtime User
Win8 has some good things about it. There are also some start menu replacement apps but the one i tried was too slow.
I dont really think your issue is a win8 issue, more of a setup issue.

Maybe you do a clean install of B4A in a non-system area and move your project (infact unzip this one).
I am sure you must have tried everything though. :)
 

Harris

Expert
Licensed User
Longtime User
Win8 has some good things about it. There are also some start menu replacement apps but the one i tried was too slow.
I dont really think your issue is a win8 issue, more of a setup issue.

Maybe you do a clean install of B4A in a non-system area and move your project (infact unzip this one).
I am sure you must have tried everything though. :)


Yep, tried all that... to no avail.

Anyways, 450 bucks later, got me a new Acer AMD 8 with quad (remember the mechanic on Red Green?), 8 gig ram and 1 TB drive 15 inch laptop.

Set it all up, compiled the app and...... wait for it...... SUCCESS!!!!!

Reminds me of a funny story... which I witnessed...
Back in my youth and my home province, Nova Scotia, I worked in the bush cutting trees for firewood (birch, maple and oak). The guy I worked for bought a brand new power saw. After 15 minutes it quit. After 2 frustrating hours of trying to start it - he finally gave up.

Instead of taking it back to the shop from where he bought it, he dug a hole with his backhoe - and buried it...

Likewise, one can find my old XP box in my backyard - 2 feet under... RIP u POS...

Yes, Win 8 ain't all that bad - just a wee bit different.

Thanks for all your help TDS. A true friend (to very many) indeed.
Erel should have a contest for most helpful... which excludes himself... otherwise, whats the point?
 
Top