问题
After updating from NS 5 to NS 6, I got the following error when trying to run my application on Android:
[Vue warn]: Error in v-on handler: "TypeError: Cannot read property 'ViewCompat' of undefined"
回答1:
This turned out to be a problem in a plugin I was using that needed to be updated to use the AndroidX support library. I found it by searching my plugins for the string 'ViewCompat' - you should see a reference to AndroidX rather than android.support. Specifically, I resolved my issue by updating from an older version of nativescript-loading-indicator to @nstudio/nativescript-loading-indicator.
来源:https://stackoverflow.com/questions/57597342/n-nativescript-6-typeerror-cannot-read-property-viewcompat-of-undefined