Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error : Config cannot be resolved to a variable

Tags:

android

In the following code i am having the above error ,here i declared the variable also.

contentBitmap = Bitmap.createBitmap(300, 300,
                Config.ARGB_8888);
        Backgroundcanvas = new Canvas(contentBitmap);

1 Answers

It's not recognizing Config as a class name. You need to either use the qualified name Bitmap.Config.ARGB_8888 or else put import android.graphics.Bitmap.Config; at the top of the file.

like image 108
Ted Hopp Avatar answered Mar 29 '26 20:03

Ted Hopp