Property 'device' does not exist on type 'typeof Device'

Hi all ! After upading to 2.0.0-rc.4 I can not build my project to Android. I have error … Help please.

 Property 'device' does not exist on type 'typeof Device'.

    platform.ready().then(() => {
     this.device['uuid'] = Device.device.uuid;
   });
1 Like

Ionic version: 2

The official docs for the native Device are obsolete.
Example:
The Device object does not have more a device attribute.

Example:
Device.device.uuid wont compile. The compiler outputs

Property ‘device’ does not exist on type ‘typeof Device’.
Now the right implementation is
Device.uuid

freez_1, thx a lot, I solved problem.Do not you know occasionally what happend with this ?

Sorry, no, I don’t know

Device was changed in 2.2.11 of ionic-native: https://github.com/driftyco/ionic-native/releases

Now you just say Device.uuid instead of Device.device.uuid

1 Like