[Solved] ArrayList is not applicable for the arguments (double, double, int, String)


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);

2

solved ArrayList is not applicable for the arguments (double, double, int, String)