B4J Question image add & use in own lib

Tayfur

Well-Known Member
Licensed User
Longtime User
You can add files to b4x libs.


B4X:
Public Sub resimgetir
    AppLog("Resim getir")
    Wait For (File.CopyAsync(File.DirAssets, "5009.PNG", "C:\Users\PC1\Desktop", "5009.png")) Complete (Success As Boolean)
    AppLog("Resim getir :"&Success)
End Sub
hello @Erel
I added image in my library project and complied it.

Return is :
Waiting for debugger to connect...
Resim getir
java.io.FileNotFoundException: 5009.PNG
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:209)
at anywheresoftware.b4a.objects.streams.File.Copy(File.java:336)
at anywheresoftware.b4a.objects.streams.File$3.call(File.java:406)
at anywheresoftware.b4a.objects.streams.File$3.call(File.java:1)
at anywheresoftware.b4a.BA$4.run(BA.java:272)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Resim getir :false
 
Upvote 0

Tayfur

Well-Known Member
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…