Cordova-plugin-device device.serial not work in android 9

I am using cordova-plugin-device device.serial in the project and build the APK, it won’t work in android 9, but it is working fine in android version before 9.
I am using the PLUGIN sample project (without device.serial) to build the APK, it work fine in android 9, but when I added the device.serial into the project, it won’t work now.
Is there any other way to get the device serial number in android 9?

This is a known problem - see the GitHub repo Issues:

Did the device.uuid can replace the serial?
I have an application that read the device.serial in the Sub Main() of the first form is working fine on android 6, but it got “Uncaught ReferenceError: device is not defined. line 9 column 16” in android 9. Is it normal? Please suggest how to solve.

You’ll have to look at the documentation for the plugin. It’s not something we know about ourselves.