From 89a9a58c17ff2d8274161f771f57284fd29f0c0f Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 6 Sep 2024 20:32:30 -0500 Subject: [PATCH] add missing step to rust in android docs --- docs/src/getting-started/rust-in-android.md | 13 +++++++++++++ .../java/com/example/beerus_android/Beerus.java | 4 ++++ 2 files changed, 17 insertions(+) create mode 100644 light_client_app/android/app/src/main/java/com/example/beerus_android/Beerus.java diff --git a/docs/src/getting-started/rust-in-android.md b/docs/src/getting-started/rust-in-android.md index 5795d30..11d49ae 100644 --- a/docs/src/getting-started/rust-in-android.md +++ b/docs/src/getting-started/rust-in-android.md @@ -149,3 +149,16 @@ class MainActivity : AppCompatActivity() { } } ``` + +Add the following to your build.gradle file to link the library: + +```kotlin +sourceSets { + named("main") { + jniLibs.srcDir("src/main/jni/") + // Configure the JNI libraries directory + // Note: For newer configurations, JNI libraries are often managed differently + // Check your specific plugin version's documentation for precise configuration + } + } +``` diff --git a/light_client_app/android/app/src/main/java/com/example/beerus_android/Beerus.java b/light_client_app/android/app/src/main/java/com/example/beerus_android/Beerus.java new file mode 100644 index 0000000..e576488 --- /dev/null +++ b/light_client_app/android/app/src/main/java/com/example/beerus_android/Beerus.java @@ -0,0 +1,4 @@ +package com.example.beerus_android; + +public class Beerus { +}