Assistance Required for Building Inji-Wallet Mobile Application

Hello Team,

I am following the instructions provided in the Inji Wallet 2documentation to build the mobile application on ubuntu OS

When I run the command:
npm run android:mosip --reset-cache

I encounter the errors shown in the attached image.

Could you please assist me in resolving these issues and help me successfully build the Inji Wallet mobile application?

Thank you!
Best regards,
Poonam

Hi @poonam_tekdi ,

Thank you for reaching out, We are looking into your query and one of our expert colleagues will respond to it here.

Best Regards
Team MOSIP

Hi @poonam_tekdi
can you please confirm Java version in this terminal session?
It should be Java 17 or lower

Hello Team,

Yes I am using java 11 and I am still facing issues while run following command
npm run android:mosip --reset-cache

Please help me to resolve issue and I am attaching screenshot of error

Hi @poonam_tekdi
Could you kindly provide us with a few more details, such as the whole error log, mosip branch details and the versions of node, npm, and Java?

Additionally, please try deleting the ‘node_modules’ directory and running ‘npm install’ again to ensure a clean installation of all dependencies.

Hello Team,

Following are the requested details

  1. Node - v18.20.5
  2. Java - openjdk version “11.0.11” 2021-04-20
  3. Npm - 10.9.0

I have deleted and install node_modules again still I am getting issue

Hello @poonam_tekdi
Thanks for providing the version details of tools, Kindly help us with the full error log.

TIA

Hello Team,

MOSIP Branch - release-0.13.x
Following are the errors

ttpl-rt-063@ttpl-rt-063:~/mosip/inji-wallet$ npm run android:mosip

mosip-resident-app@1.0.0 android:mosip
react-native run-android --variant=residentappDebug

info Starting JS server…

  • daemon not running; starting now at tcp:5037
  • daemon started successfully
    info Launching emulator…
    info Successfully launched emulator.
    warn “variant” flag is deprecated and will be removed in future release. Please switch to “mode” flag.
    info Installing the app…
    Starting a Gradle Daemon (subsequent builds will be faster)

Task :react-native-gradle-plugin:compileKotlin

Task :react-native-gradle-plugin:compileKotlin FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See Command-Line Interface
1 actionable task: 1 executed
e: /home/ttpl-rt-063/mosip/inji-wallet/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/BundleHermesCTask.kt: (138, 11): This declaration is experimental and its usage must be marked with ‘@kotlin.ExperimentalStdlibApi’ or ‘@OptIn(kotlin.ExperimentalStdlibApi::class)’

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:react-native-gradle-plugin:compileKotlin’.

Compilation error. See log for more details

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 3m 9s

error Failed to install the app. Make sure you have the Android development environment set up: Get Started with React Native · React Native.
Error: Command failed: ./gradlew app:installResidentappDebug -PreactNativeDevServerPort=8081
e: /home/ttpl-rt-063/mosip/inji-wallet/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/BundleHermesCTask.kt: (138, 11): This declaration is experimental and its usage must be marked with ‘@kotlin.ExperimentalStdlibApi’ or ‘@OptIn(kotlin.ExperimentalStdlibApi::class)’

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:react-native-gradle-plugin:compileKotlin’.

Compilation error. See log for more details

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 3m 9s

at makeError (/home/ttpl-rt-063/mosip/inji-wallet/node_modules/@react-native-community/cli-platform-android/node_modules/execa/index.js:174:9)
at /home/ttpl-rt-063/mosip/inji-wallet/node_modules/@react-native-community/cli-platform-android/node_modules/execa/index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (/home/ttpl-rt-063/mosip/inji-wallet/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:82:7)
at async Command.handleAction (/home/ttpl-rt-063/mosip/inji-wallet/node_modules/@react-native-community/cli/build/index.js:108:9)

info Run CLI with --verbose flag for more details.

Hello Team,

Could you please review the error logs mentioned above? I would appreciate a prompt response as I have been facing this issue for quite some time now.

Thank you!

Hello @poonam_tekdi
Thanks for providing the logs, checking out the issue.

Hello Poonam,
Please try out the below mentioned solutions

  1. Clear gradle cache
cd android
gradlew --stop
gradlew cleanBuildCache
  1. Manually install @ react-native-community/cli-platform-android
npm i @react-native-community/cli-platform-android

If the above mentioned solution does not work out, please refer here

cc: @Alka1703