jeudi 29 mai 2014

Android - Constructor not visible BUT *.java copied from old project


Vote count:

0




at work I got an old Android project that I am using for a new project. From the old project I copy



Sensor.java


in my new project. I do this simply with copy-paste in the Eclipse Package Explorer.


The Sensor.java contains a class with an empty constructor, both public:



public class Sensor { ...

public Sensor() {} ...}


However, when I try to call



Sensor sensor = new Sensor();


the compiler tells me "The constructor Sensor() is not visible", but the exact same thing worked in the old project... I'm clueless and I googled the problem but I can't solve it. Everything is public, so it should be visible, shouldn't it?



asked 59 secs ago






Aucun commentaire:

Enregistrer un commentaire