0

I wanted to use flutter_pdfview in an app. During debugging everything worked fine, but once i build the app in Release mode I clicked around in the App and opened some PDF and at some pont a PDF does not load, so i got back to the page before, and at this point the touchscreen of my device does not respond any longer. I tetsted it on two devices with the arm64 version, both devices do not respond any longer at some point. However when I open the App on an armeabi device everything is working fine.

The error is: (Unhandled Exception: PlatformException(error, Neither user 10350 nor current process has android.permission.WAKE_LOCK., null)

I am using flutter_pdfview version 1.0.2+2, my flutter doctor -v is:

   • Flutter version 1.19.0-2.0.pre.142 at C:\flutter\flutter
   • Framework revision 721927efd3 (7 days ago), 2020-05-21 17:52:02 -0700
   • Engine revision 9ce1e5c5c7
   • Dart version 2.9.0 (build 2.9.0-10.0.dev 7706afbcf5)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
   • Android SDK at C:\Users\Jakob\AppData\Local\Android\sdk
   • Platform android-29, build-tools 29.0.2
   • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
   • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
   • All Android licenses accepted.

[√] Android Studio (version 3.5)
   • Android Studio at C:\Program Files\Android\Android Studio
   • Flutter plugin version 42.1.1
   • Dart plugin version 191.8593
   • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[!] IntelliJ IDEA Community Edition (version 2019.3)
   • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.3.4
   X Flutter plugin not installed; this adds Flutter specific functionality.
   X Dart plugin not installed; this adds Dart specific functionality.
   • For information about installing plugins, see
     https://flutter.dev/intellij-setup/#installing-the-plugins

[!] VS Code (version 1.45.1)
   • VS Code at C:\Users\Jakob\AppData\Local\Programs\Microsoft VS Code
   X Flutter extension not installed; install from
     https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[!] Connected device
   ! No devices available

! Doctor found issues in 3 categories.
4

1 回答 1

0

After some time, I fixed it by adding <uses-permission android:name="android.permission.WAKE_LOCK" /> to AndroidManifest.xml

于 2020-05-29T15:15:08.183 回答