Hello World App keeps crashing in Android Studio

Hello, I’m a newbie in Juce and I have been stuck here for so long. Can someone help me?
The issue is when I try to run the example Hello World app on my Emulator (Pixel API27), it always gives me the error of “NewProject has stopped”
In Android Studio I got something like this from Logcat:

2019-11-05 12:33:26.510 7340-7340/? I/zygote: Not late-enabling -Xcheck:jni (already on)
2019-11-05 12:33:26.529 7340-7340/? W/zygote: Unexpected CPU variant for X86 using defaults: x86
2019-11-05 12:33:26.689 7340-7340/com.yourcompany.newproject I/JUCE: JUCE Assertion failure in juce_String.cpp:327
2019-11-05 12:33:26.750 7340-7340/com.yourcompany.newproject E/System: Unable to load dex file: java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]
2019-11-05 12:33:26.763 7340-7340/com.yourcompany.newproject E/System: java.io.IOException: Bad range
        at dalvik.system.DexFile.createCookieWithArray(Native Method)
        at dalvik.system.DexFile.openInMemoryDexFile(DexFile.java:366)
        at dalvik.system.DexFile.<init>(DexFile.java:107)
        at dalvik.system.DexPathList.makeInMemoryDexElements(DexPathList.java:291)
        at dalvik.system.DexPathList.<init>(DexPathList.java:105)
        at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:117)
        at dalvik.system.InMemoryDexClassLoader.<init>(InMemoryDexClassLoader.java:35)
        at dalvik.system.InMemoryDexClassLoader.<init>(InMemoryDexClassLoader.java:46)
        at java.lang.Runtime.nativeLoad(Native Method)
        at java.lang.Runtime.doLoad(Runtime.java:1099)
        at java.lang.Runtime.loadLibrary0(Runtime.java:1014)
        at java.lang.System.loadLibrary(System.java:1657)
        at com.roli.juce.Java.<clinit>(Java.java:9)
        at com.roli.juce.Java.initialiseJUCE(Native Method)
        at com.roli.juce.JuceApp.onCreate(JuceApp.java:13)
        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5740)
        at android.app.ActivityThread.-wrap1(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

(I can only upload one pic, so just tell me if you need more info)
I’m basically following the Android tutorial and using Android Gradel Plugin Version 3.5.2 Android Studio version 5.4.1. It would be really helpful to me if anyone could give me some advice.
Thank you guys!!

I just tried downloading a fresh copy of JUCE (5.4.5). Loading the DemoRunner project in the Projucer, enabling the Android exporter, exporting the project into Android Studio, then running it on the Pixel XL API 27 emulator. No problems.

Please could you try downloading the latest version of JUCE and Android Studio (version 3.5.2) from https://developer.android.com/studio.

If you still have problems please include the exact steps which lead to the issue so that others can reproduce.

Hi! Thank you for your reply. I tried to reinstall but got the same error.
Here is my procedure:

  1. Open the Projucer, create a new GUI project with only Android platform checked.
  2. Under Exporters-Android, change the minimum sdk version to 23
  3. Go to File - Save project and open in IDE
  4. In Android Studio, click the run button to run the App in Pixel API 27 (emulator)
  5. Install successfully but at the moment the windows of this App is about to pop up, it crashes.

What my SDK manager looks like

What my Projucer setting looks like (I only changed the minimum SDK)

set Push Notifications Capability to Disabled in Projucer for Android Exporters, OK!
but DeomRunner can set Push Notifications Capability Enabled.

Just did the same, tried to compile and run the DemoRunner, it compiled and installed on my new Galaxy S10e, but crashes immediately. I found this error in the logcat:

JNI DETECTED ERROR IN APPLICATION: illegal class name ‘潣⽭潲楬樯捵⽥畊散捁楴楶祴’

which generates the exception in the String class:

2020-01-18 20:26:49.143 12781-12781/com.juce.demorunner I/JUCE: JUCE Assertion failure in juce_String.cpp:327
2020-01-18 20:26:49.146 12781-12781/com.juce.demorunner I/chatty: uid=10349(com.juce.demorunner) identical 12 lines
2020-01-18 20:26:49.146 12781-12781/com.juce.demorunner I/JUCE: JUCE Assertion failure in juce_String.cpp:327

@ZioGuido this is due to a bug in Projucer that makes it write garbage.
See 5.4.4 + Android Studio (Windows) does not work? and String assertion in android build for more information.