Skip to content Skip to sidebar Skip to footer

Arraylist Is Not Applicable For The Arguments (double, Double, Int, String)

i'm trying to make a map in my application which the latitude and longitude from my database MySQL. that's my screenshot listview when click i want to show on map. and here's my a

Solution 1:

The problem is right there in the error

The method add(int, Entity_BikeShopRepair) in the type ArrayList is not applicable for the arguments (double, double, int, String)

The compiler is telling you that it is expecting you to give it an int and an Entity_BikeShopRepair and instead you're giving it four parameters so it doesn't know what to do.

list_lokasi.add(entity.getLat(), entity.getLng(), 1, entity.getShop_Name()); 

It looks like you just need to do

list_lokasi.add(1, entity);

or, if you don't care what position in the list the entity is added,

list_lokasi.add(entity);

Post a Comment for "Arraylist Is Not Applicable For The Arguments (double, Double, Int, String)"