Java Question cannot find symbol Bitmap

Kiran Raotole

Active Member
Licensed User
I'm getting this error :
B4X:
B4A Version: 9.50

Java Version: 9

Parsing code.    (0.00s)

Building folders structure.    (0.01s)

Compiling code.    (0.49s)

Compiling layouts code.    (0.01s)

Organizing libraries.    (0.00s)

    (Android Support Library)

Generating R file.    (0.00s)

Compiling debugger engine code.    (0.03s)

Compiling generated Java code.    Error

B4A line: 46

balaji.printBitmapImage(bitmap,1)

src\b4a\example\main.java:433: error: cannot find symbol

mostCurrent._balaji.printBitmapImage((Bitmap)(_bitmap.getObject()),(int) (1));

                                      ^

  symbol:   class Bitmap

  location: class main

My B4A code :
B4X:
    Dim bitmap As Bitmap
    bitmap.Initialize(File.DirAssets,"logo.png")
    balaji.printBitmapImage(bitmap,1) ---> Getting error on this line

If I removed balaji.printBitmapImage(bitmap,1) linke, then project compile properly.

What the issue?
 
balaji.printBitmapImage(bitmap,1)
Try change your wrappercode. Use Object here and cast it to android Bitmap in your wrapper.
B4X:
    public void printBitmapImage (Object bitmap, int somewhat){
        // to use the bitmap from b4a. use the Object and cast it to a Bitmap in your library.
        //printBitmapImage ((Bitmap)bitmap);
    }
 
Back
Top