react native cant deploy app on emulated android device


I created a plain react native app and tried to deploy it on my android virtual device. I created the avd inside of android studio. When I create a native android app inside android studio and deploy it on the avd. There are no problems, the app will start without problems on the avd.

But when I use this working AVD for my react native app, the following error occurs:

Scanning 7 folders for symlinks in /home/andi/Workspace/ReactNative/Album/node_modules (0ms)
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...

Exception in thread "main" java.lang.ExceptionInInitializerError
        at java.base/javax.crypto.JceSecurityManager.<clinit>(
        at java.base/javax.crypto.Cipher.getConfiguredPermission(
        at java.base/javax.crypto.Cipher.getMaxAllowedKeyLength(
        at java.base/$BulkCipher.isUnlimited(
        at java.base/$BulkCipher.<init>(
        at java.base/$BulkCipher.<clinit>(
        at java.base/<clinit>(
        at java.base/
        at java.base/$100(
        at java.base/$AbstractTLSContext.<clinit>(
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(
        at java.base/$Service.getImplClass(
        at java.base/$Service.newInstance(
        at java.base/
        at java.base/
        at java.base/
        at java.base/
        at java.base/
        at java.base/
        at java.base/<init>(
        at java.base/<init>(
        at java.base/
        at java.base/
        at java.base/
        at org.gradle.wrapper.Download.downloadInternal(
        at org.gradle.wrapper.Install$
        at org.gradle.wrapper.Install$
        at org.gradle.wrapper.ExclusiveFileAccessManager.access(
        at org.gradle.wrapper.Install.createDist(
        at org.gradle.wrapper.WrapperExecutor.execute(
        at org.gradle.wrapper.GradleWrapperMain.main(
Caused by: java.lang.SecurityException: Can not initialize cryptographic mechanism
        at java.base/javax.crypto.JceSecurity.<clinit>(
        ... 33 more
Caused by: java.lang.SecurityException: Can't read cryptographic policy directory: unlimited
        at java.base/javax.crypto.JceSecurity.setupJurisdictionPolicies(
        at java.base/javax.crypto.JceSecurity.access$000(
        at java.base/javax.crypto.JceSecurity$
        at java.base/javax.crypto.JceSecurity$
        at java.base/ Method)
        at java.base/javax.crypto.JceSecurity.<clinit>(
        ... 33 more
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:

I have another MacOS system, tried exactly the same things and there it is working. Some people from googles search said, it can occur, when the system uses Java 9, so they switched it back to 8. But I already tried this… No solution for me.

Can someone please try to reproduce this on his system? They getting started guide is here:

Would like to know, if its a problem with opensuse or my local config. Or does someone have a solution for me? :slight_smile:

Thanks in advance

According to what you posted, your code may not support openjdk, I see lines that reference Sun Java (Oracle) specifically.
Don’t know if openjdk supports them.

Recommend you install an Oraccle JDK.
Before you try Oracle though, have you installed the JDK part of openjdk (openjdk-devel)?


Hi Tsu,

thanks for your help. Fortunately I found the problem. I set

update-alternatives --config java

to set the jre version to 8. But originally it had problems with the jdk. To set the jdk version to 8 you need this command:

update-alternatives --config javac

Problem solved. Thread can be closed :good:

Absolutely yes.

A useful command to keep in mind is the following, which displays all the update-alternative groups(what is configured on your machine to be managed with update-alternatives, even there is only a single option), and you’ll find javac listed

update-alternatives --get-selections