B4A Library [Tool] Simple Library Compiler - Build libraries without Eclipse

Status
Not open for further replies.

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User
Erel,

Can you know why not find my classes? Look in my sample, please!


I create a simple library based on GDK.JAR (Google Glass SDK Sneak Peek)
When I compile throught SLC, is ok, no errors, but when I try to use, ocurrs this error


** Activity (main) Create, isFirst = true **
java.lang.NoClassDefFoundError: com.google.android.glass.app.Card
at com.visualnet.library.livecard.Initialize(livecard.java:32)
 

Attachments

  • SimpleLibraryOK.jpg
    84.6 KB · Views: 309
  • LiveCard.zip
    17.1 KB · Views: 300
  • TestLib.zip
    5.9 KB · Views: 330

ppgirl

Member
Licensed User
Longtime User
Hi Erel,

I want add option "-encoding utf-8 -charset utf-8 " when making javadoc , but where can I add ?

I need change charset for support utf-8 Chinese . thanks!
 

ppgirl

Member
Licensed User
Longtime User
Thanks ,

It has same problem while ignore field fill "org,com.android,com.example,com.hoho -encoding utf-8 -charset utf-8 "

Which can I set option when creating XML?

Starting step: Compiling Java code.
Completed successfully.
Starting step: Creating jar file.
Completed successfully.
Starting step: Creating XML file.
D:\work\SimpleLibraryCompiler.cul\cul\src\org\freyja\libgdx\cocostudio\ui\BaseWidgetParser.java:16: θ­¦ε‘ŠοΌšηΌ–η  GBK ηš„δΈε―ζ˜ ε°„ε­—η¬¦
* ιŽΊΡ‚ζ¬’ ζžξ„ε΄²ι£?
^
D:\work\SimpleLibraryCompiler.cul\cul\src\org\freyja\libgdx\cocostudio\ui\BaseWidgetParser.java:30: θ­¦ε‘ŠοΌšηΌ–η  GBK ηš„δΈε―ζ˜ ε°„ε­—η¬¦
/** ιξ„€ε‘ηžη‚΄?瑙f瀽鍣?*/
 

Gunther

Active Member
Licensed User
Longtime User
Hi Erel,

I am getting stucked with this Libary. It gets created without any errors or warnings. It gets also fine in the IDE. But when I chose that in the LIBs than it gets (loading..) and ... nothing anymore. No showing of version number etc.

What is may be wrong?

Ciao,

Gunther
 

Attachments

  • achartengine.zip
    130.1 KB · Views: 301
  • AChartEngine JAR XML.zip
    88.3 KB · Views: 280
Last edited:

mnf

New Member
Licensed User
Longtime User
Hi,

Just trying out the Library Compiler and struggling to get even the FirstLibrary to compile:

Alternates between:

Starting step: Compiling Java code.
javac 1.7.0_07
E:\Program Files (x86)\Anywhere Software\Basic4android\Libraries\FirstLibrary\src\com\example\FirstLib.java:3: error: package anywheresoftware.b4a does not exist
import anywheresoftware.b4a.BA;
^
1 error

and

Starting step: Compiling Java code.
javac 1.7.0_07
javac: directory not found: bin\classes
Usage: javac <options> <source files>
use -help for a list of possible options


Error.

Have (full) version of b4a installed on E: in Program Files (x86)\Anywhere Software\Basic4android and this works well - extracted Library compiler to the b4a directory after trying on D: (with same results).
I guess a path problem:

javac.exe E:\Program Files\Java\jdk1.7.0_07\bin\javac.exe
android.jar D:\Android\adt-bundle-windows-x86_64\sdk\platforms\android-17\android.jar
Additional libraries E:\Program Files (x86)\Anywhere Software\Basic4android\AdditionalLibraries
Shared modules -----

Any suggestions gratefully received.....
 

daemon

Active Member
Licensed User
Longtime User
The first one probably indicates that you haven't added atleast one of the three .jar files to your project: B4Ashared.jar, Core.jar, android.jar

I get the 2nd error in almost every alternate click to 'Compile' button. Just ignore it and click again.
 

mnf

New Member
Licensed User
Longtime User
Many thanks for the quick response.... Copy B4AShared.jar and Core.jar to the FirstLibrary/libs directory and compilation success

Now to try Flurry!
 

mnf

New Member
Licensed User
Longtime User
Yes - that works too! Added FlurryAds-4.2.0.jar and FlurryAnalytics-4.2.0.jar

Now to try adding some more functionality to IceFairy's wrapper to the Zxing library to try and get camera output into a panel instead of full screen. That's a story for a different thread.
 

Johan Schoeman

Expert
Licensed User
Longtime User
Will SLC accept this structure to be compiled?

FirstLibrary
libs
a.jar
b.jar​
src
com
example
blabla_1
a1.java
a2.java
a3.java​
blabla_2
b1.java
b2.java
b3.java​
blabla_3
c1.java
c2.java
c3.java​
 
Last edited:

kiki78

Active Member
Licensed User
Longtime User
Hi Erel,

I try to wrap FFMPeg using this project https://github.com/guardianproject/android-ffmpeg-java.
For native et java parts seems it's ok, but I have problem with Simple Library Compiler and Auto generated java files.

I receive this message in SLC logs:

... package org.ffmpeg.android does not exist
import org.ffmpeg.android.R;

^
1 error

Have you some idea ?



Regards
 

kiki78

Active Member
Licensed User
Longtime User
Thank you Erel,
I think I'm going in bad way, as I try to modify original java source to directly compile it for B4A.
I change that and create new library to wrap original.

This begin to work...
My last problem is for ffmpeg executable distribution.
For now I put it in B4A project assets files and extract it at start of application. But it's not very clean !

I try to put it in "additional" directory in my wrapper library project, but I don't know how to found the correct path where this files are copied on devices. For example, may I extract this path from ba.context ?

Regards
 

kiki78

Active Member
Licensed User
Longtime User
This is android executable, usable, for example, in console, like ffmpeg on other OS.
I need to know where it is to call it from java code.

Originally, this file is included in resources of java library in res/raw and extract the first time in constructor.
But as I'm really poor in java/eclipse this never work and I don't understand why !
Seems this is due to my previous problem with auto generated R.java.
I receive message "don't find resource xxx".

So I modify that and try to include it in "additional" path of my wrapper class, that seems to be made to embedded additional files.

Regards,
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…