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

Status
Not open for further replies.

mkvidyashankar

Active Member
Licensed User
Longtime User
I am trying to create a library using a jar file.
I am getting this error.
I am very new to java.
please guide me

Starting step: Compiling Java code.
javac 1.6.0_27
H:\My Disc\android projects\library sources\Filters (1)\src\com\jhlabs\composite\AddComposite.java:19: package java.awt does not exist
import java.awt.*;
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error


Error.
 

pierosso

Member
Licensed User
Longtime User
is there anyone able to write a library for a native facebook login?
the new way to log in inside your application using facebook with just a messagebox without webview?
thanks
 

Informatix

Expert
Licensed User
Longtime User
The zip file in post #1 was updated with doclet tool version 1.04.
This doclet v1.04 has the same bug than the version I tested a few weeks ago. When I generate the XML file of libGDX with it, for example, I have two functions missing in the result (set, getEndPoint), and two are added (draw, get) despite they are hidden with @BA.Hide. With the previous doclet (v1.02), it was possible to get the right result with a workaround for some cases. With this doclet, I can't see a solution.
 
Last edited:

Nickle

Member
Licensed User
Longtime User
I am getting error below when trying to use SLC. I know I have something basically wrong. Java code below.. I need help..

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


B4X:
package anywheresoftware.b4a.PhoneSMS1;

import anywheresoftware.b4a.BA.Permissions;
import anywheresoftware.b4a.BA.ShortName;
import anywheresoftware.b4a.BA.*;
import android.telephony.*;


@Version(1.0f)
@ShortName("PhoneSMS1")
@Permissions(values={"android.permission.SEND_SMS"})
public class PhoneSMS1 {

    /**
    * Sends an SMS message. Note that this method actually sends the message (unlike most other methods that
    *create an intent object).
    */
    public static void Send(String PhoneNumber, String SMSC, String Text)

    {
        SmsManager sm = SmsManager.getDefault();
        sm.sendTextMessage(PhoneNumber, SMSC, Text, null, null);

    }
}
 
Last edited:

Nickle

Member
Licensed User
Longtime User
Thanks Erel,

I tried again and below screen is the new error I get

 

acharya1981

New Member
Licensed User
Longtime User
When I try to compile any eclipseproject folder in Simple Library Compiler - to generate B4A Library - it does compile correctly - but when - Loading generated lib in B4A - it always shows some error - for all different projects - as - some_package.some_class.some_child - already exists - there is no use of using @hide even - help ....
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
Hi Erel,

I have been trying to implement some missing functionality in the Google Play Services wrapper that NFOBoy created earlier this year. I loaded the project into Eclipse, implemented the missing functions & then fixed all the errors Eclipse was telling me about. All good - except when I try to compile using SLC, I get this error:

Starting step: Compiling Java code.
javac 1.7.0_25
C:\Users\Colin.Smith.DOMAIN\workspace\GoogleGameHelper\src\b4a\game\helper\AchievementWrapper.java:3: error: package com.google.android.gms.games does not exist
import com.google.android.gms.games.Player;
^
1 error


Error.

At first I thought it was something weird with gms.games - however I've realized that this is the first call to an external .jar file in the first code module, so I'm thinking it's a configuration issue, but I don't know what. I've attached a screenshot so you can see the setup in Eclipse, but it all seems good to me, so am I missing something in SLC?

Thanks - Colin.
 

Attachments

  • screenshot.png
    290.7 KB · Views: 398

Computersmith64

Well-Known Member
Licensed User
Longtime User
EDIT: OK - I've got it sorted now. I should read instructions more carefully... Thanks!
 
Last edited:

B4JExplorer

Active Member
Licensed User
Longtime User
Intellij doesn't have the custom doclet option that Eclipse does, so tried to use the command line for SLC.

LibraryCompiler.exe JarClassLoader c:\Projects_Programming\Intellij\JCL


, but it tells me


Additional libraries folder must be set in the IDE,


.... scratch that. I was using the Basic4Android command line, and should have been using the B4J_LibraryCompiler.exe.

I might upload the project, if any further problems.
 
Last edited:

B4JExplorer

Active Member
Licensed User
Longtime User
Been at this for so many hours, can't think straight anymore.

Attached is the Intellij project folder. If anyone wants to give this a try, and generate the jar and xml for the project, please share it with everyone.

Otherwise, I'll figure it out tomorrow, and post it for the B4J community.

Couldn't fit it within our 512 KB limit, but log4j-1.2.14.jar or a later log4j version, should also be in the lib folder.

The library itself is from https://github.com/kamranzafar/JCL
 

Attachments

  • JCL.zip
    344.8 KB · Views: 446
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…