LineStyleBuilder and similar cannot resolve setColor() and other functions

79 Views Asked by At

I have recently been upgrading an old android project, which was using nutiteq sdk. I begun migrating the classes and functions to the much more recent carto sdk.

While doing so, I have faced a few conflicts or incompatibilities. But something so simple as a style builder won't resolve for some reason.

I have converted the original style building code to this:

LineStyleBuilder lsb = new LineStyleBuilder();
lsb.setColor(bcolor);
lsb.setWidth(0.02f);
LineStyle lineStyle=lsb.buildStyle();

Android Studio says it cannot resolve setColor and setWidth.

I have imported the correct classes etc, but I get that issue anyway.

Does anyone out there know of what may be going on?

current sdk

old sdk

1

There are 1 best solutions below

1
MarkT On

That should certainly work. The official github sample project (CartoDB/mobile-android-samples) contains basically the same code and works as expected (OverlaysActivity.java).