EddyVerbruggen / nativescript-performance-monitor

:zap: Proof your app maintains 60-ish FPS by collecting data or showing it on screen with this NativeScript plugin!
Other
23 stars 2 forks source link

Error on NativeScript Vue project #1

Open mylmz10 opened 5 years ago

mylmz10 commented 5 years ago

I've got an error on ns-vue project. I created an empty nativescript-vue project and add plugin performance-monitor. App crash on start.

Error: "android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?"

I got "Takt undefined" on Playground

Playground Demo

@EddyVerbruggen

bellalMohamed commented 4 years ago

Quick Fix: navigate to node_modules/nativescript-performance-monitor/platforms/android/include.gradle

change compile 'jp.wasabeef:takt:1.0.3' to compile 'jp.wasabeef:takt:2.0.1'


make sure you have

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

in your AndroidManifest.xml