Getting up and running with GunJS and React Native

Getting up and running with GunJS and React Native

GunJS is a decentralised database built on web3 technologies. Getting started with it can be hard with React-native as you'll hit a few…

Kirk Ryan · 1 minute read

Before I start, I want to give credit to Natnael Teferi GitHub for writing up a great post on how to build a simple to-do app using GunJS and react-native.

The tutorial was written in Nov 2021, and at time of writing, the default version of react-native is now 0.69.0.

You'll hit your first issue when building the react-native-webview module in Android studio.

META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.1.15.

Fortunately, this is an easy fix.

  1. Head over to your project build.gradle file (the one at android/build.gradle)
  2. Add a new line to your buildscript.ext section, and just under the targetSdkVersion put this line: kotlin_version = '1.7.0'
  3. Open the build.gradle file for react-native-webview and change any reference to kotlinVersion to kotin_version - it will now refernce your project build.gradle version.

Problem fixed.

android
kotlin
react-native-webview
gunjs