3

I get an error in debugging and I can't set this boolean value. I attached a screenshot of the error.

enter image description here

I call DeviceUpdateManager in my mainActivity like this:

public class MainActivity extends AppCompatActivity implements DeviceUpdateManager.OnDataCOM {
    DeviceUpdateManager deviceUpdateManager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.deviceUpdateManager = new    DeviceUpdateManager(this.serverCOM,this.getApplicationContext(),this);
    }
etc...
}

I cannot find the error... Is it related to the passing Context in another class?

EDIT:SOLVED I reboot the PC and restarted Android Studio and everything worked great.

Daniele
  • 606
  • 1
  • 9
  • 23

2 Answers2

2

It happens when you changed variable name in code and running application with older name in code.

Mundroid
  • 370
  • 8
  • 17
1

Remove below snippet from Project/build.gradle file.

 minifyEnabled true

Please have a look at this link for more info.

https://stackoverflow.com/a/45281798/5870824

Parth Patel
  • 935
  • 1
  • 11
  • 27