0

Tried to build chirp-react-native with Java 12 and Java 11. Will not build.

If I drop down to Java 1.8 AND set my gradle distributionUrl to gradle-4.8-all.zip in chirp-react-native/android/gradle/wrapper/gradle-wrapper.properties, the package compiles and installs correctly and I think it runs correctly.

However if it's an easy fix I'd prefer to use a current JDK. Has anyone successfully built chirp-react-native using Java 12?

Steps to reproduce:

With Java 12 set in my JAVA_HOME env variable (/Library/Java/JavaVirtualMachines/jdk12-0.1.jdk)

react-native run-android fails with this error:

Could not determine Java version from 12.0.1

If I drop down to Java 11 as JAVA_HOME, I get a similar error message:

Could not determine Java version from 11.0.3

With Java 1.8 and Gradle 4.8, everything appears to build, install and run properly.

2 Answers2

0

Can you try to run ./gradlew build from the command line and check for additional log messages in console? It might be that there are some missing dependencies required by your project. What is happening if you remove ChirpSDK from the project? Can you build it with Java 11/12 and without ChirpSDK?

Dinu
  • 390
  • 1
  • 2
  • 12
  • A "hello world" app without Chirp did build with Java 12. The gradlew build says, Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. – Joyce Park May 10 '19 at 00:48
0

This comment describes the reason for this error - https://github.com/facebook/react-native/issues/22487#issuecomment-443759776

You might be able to upgrade the gradle version in the android/build.gradle file.

joextodd
  • 694
  • 4
  • 9
  • I did downgrade to Java 8, and upgrade grade to 4.8, and the app builds. However I just have an uneasy feeling because Java 8 is so old :) – Joyce Park May 10 '19 at 00:23
  • I hear you. Facebook need to sort their dependencies out :) – joextodd May 10 '19 at 13:30
  • This is with gradle 2.3.3 and gradlew 3.5.1 aka straight out of your repo: – Joyce Park May 23 '19 at 18:52
  • Sorry I couldn't upload, this is the link for the "straight out of repo" build: https://imgur.com/a/oLyjAq6 – Joyce Park May 23 '19 at 18:55
  • You need to set your app key, secret and config in the App.js file. These can be retrieved from developers.chirp.io. If you think my response answers your question please consider marking it as the answer. Thanks! – joextodd May 25 '19 at 16:08
  • Oh, I'm an idiot! I had these configs set in the original bug report, but I lost them when I did a fresh git clone... so I think the answer above is more apropos for the original question. Thanks Joe – Joyce Park May 28 '19 at 00:42