4

The App crashed while navigating files within directory. crash log as follows:

JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal start byte 0xf6
art/runtime/check_jni.cc:65]     string: 'Test Color.X7��37meaba'

java.io.File.list(File.java:742)
java.io.File.listFiles(File.java:784)
Anirudh Sharma
  • 7,968
  • 13
  • 40
  • 42
Ganesh Kanna
  • 2,269
  • 1
  • 19
  • 29

2 Answers2

5

Sign the apk before running for this case to avoid crash.

Ganesh Kanna
  • 2,269
  • 1
  • 19
  • 29
  • As a safe workaround is perfect. I can delete the file that generates the problem, but for developers in countries with other encodings, this can be a nightmare! – Tano Mar 08 '15 at 21:35
  • This doesn't seem to work anymore. I just wiped the emulator's data to continue with the development and tried not to add files with non-ascii characters. – Adrián Pérez Sep 11 '16 at 16:06
  • 1
    sounds insane, why should I sign if I still developing my app? – user924 Oct 29 '17 at 15:58
  • As mentioned by Tano deleting files will make yourself tired and bored. Signing APK is relief for you. – Ganesh Kanna Oct 31 '17 at 05:12
  • 1
    @GaneshKanna..why unsigned apk is crashing..what is the reason behind it? – Chandrakanth Apr 03 '18 at 13:25
0

If this happens for files OUTSIDE (not bundled in) your apk, just test on a real device. For me the emulator was causing the issue.

Jibbo
  • 442
  • 3
  • 13