Java Question Hola me ayudan / Hello, help me.

Enxix

Member
Estoy desarrollando una envoltura. Ya tengo el codigo escrito en Eclipse. Como soy nuevo no entiendo bien lo siguiente.
Una vez escrito el codigo tengo que compilarlo con la herramienta (Simple Library Compiler) SLC, por que lo hice asi y me salta el siguiente error.

I am developing a wrapper. I already have the code written in Eclipse. Since I'm new, I don't quite understand the following.
Once the code is written I have to compile it with the SLC tool (Simple Library Compiler), because I did it that way and I get the following error.

Error:
error: cannot find symbol
import androidx.annotation.NonNull;
                          ^
  symbol:   class NonNull
  location: package androidx.annotation
1 error
Error.

Eclipse references to androidx.annotation are included.

Am I skipping any steps?
Did I do something wrong?
Could you help me, because I also want to learn how to wrap well since some libraries are more complex and I want to incorporate them into b4a. From already thank you very much

Las referencias en eclipse de androidx.annotation estan incluidas.
Me estoy salteando algun paso?
Algo hice mal?
Me podrian ayudar, porque tambien quiero aprender bien a envolver ya que algunas librerias son mas complejas y las quiero incorporar a b4a. Desde ya, muchas gracias
 

Enxix

Member
You need to copy the android-support-annotations.jar library to the additional libraries folder. Maybe here you can find a solution https://www.b4x.com/android/forum/threads/simple-library-compiler-import-problems.101969/
Hello. Thanks for answering. I understand. So the other files (JAR) that I use in the wrapper have to go to the additional B4A libraries. I tell you that I extracted the JARs from the files (AAR). What should I also do with these files? reference them with @DependsOn.? Place them in a specific folder? Thanks for the help.
 

N. Franz

Member
I am a little confused.

If you are using an AAR library you must copy that file to the Additional Libraries Folder.



Now I'm not sure if I'm right (But it works for me) when I create a container referencing an AAR Library what I do is extract the classes.jar file and put it in the Libs folder (In my container folder . ...\FirstLib\Libs\classes.jar)

@DependsOn... "classes.jar".



And in the B4a ide I make reference to #AdditionalJar: Name of the AAR library that is in: Additional.

================

I don't quite understand, if what you mean is that you have to copy each file. Normally SLC is able to locate the libraries it requires, such as: import anywheresoftware.b4a... It knows that you are referring to the Core.jar library.



I hope you let me understand.

I am sure that in this community there are more experienced people and they offer you better help.
 

Enxix

Member
Hello. If I do the same. From the AAR files I extract the file "classes.jar." In eclipse, I add them with "Add external JARs". That's how I see the methods and classes. By doing all that, plus the written code, I have the wrapper ready. In Eclipse it doesn't give me any errors. BUT. When I compile it with the tool (SLC) I get the error in post #1, I wanted to know if the AAR files need to be referenced in some way or added somewhere specific.? And the JAR files (the ones I added in eclipse) where do I place them? or does the SLC tool know where to look for them?

And thanks for responding
 

N. Franz

Member
Well, if you get an error, it would be necessary to do the same with those libraries. If you don't want to fill up with many files in the additional libraries folder, you can try to make one with #AdditionalLib: Absolute path.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…