microsoft / microsoft/onnxruntime

[Mobile] Could not activate JNI Handle 0x7ff647d7d0 (key_handle 0xd084f07) of Java type 'crc646e4b5c24e03cdbf9/MainActivity'

Open
#32,495 0 comments 0 reactions 0 assignees View on GitHub
.NET api:CSharp api:Java platform:mobile
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

### Describe the issue

when I add onnxruntime in .net android and there is error:
`Could not activate JNI Handle 0x7ff647d7d0 (key_handle 0xd084f07) of Java type 'crc646e4b5c24e03cdbf9/MainActivity' `

### To reproduce

create android application.
add the package

here is the repo:https://github.com/ljzj2/XMedicalAndroid

### Urgency

_No response_

### Platform

Android

### OS Version

windows 10

### ONNX Runtime Installation

Built from Source

### Compiler Version (if 'Built from Source')

_No response_

### Package Name (if 'Released Package')

None

### ONNX Runtime Version or Commit ID

1.29.0

### ONNX Runtime API

C#

### Architecture

ARM64

### Execution Provider

Other / Unknown

### Execution Provider Library Version

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure in the linked XMedicalAndroid repository using the reported ONNX Runtime 1.29.0 source build on .NET Android, ARM64, and Windows 10. Trace the `MainActivity` JNI activation error and compare the project’s package and runtime configuration. Done means the failure is reproduced with a documented cause and a verified resolution or a clearly narrowed missing detail.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
machine-learning, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.