New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 731878 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2017
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

JNI Generator: @MainDex annotation is ignored for classes which implement an interface

Project Member Reported by jcivelli@chromium.org, Jun 9 2017

Issue description

The renderer process only registers JNI native methods for Java classes annotated with MainDex.
The JNI generator script parsing Java classes for that annotation does not support classes which implements an interface or extends another class. So the MainDex annotation is ignored for these classes and their native methods don't get registered and you get a:
java.lang.UnsatisfiedLinkError: No implementation found for ...
when code calls the native methods.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5e80aa85a179f05d664a003574ad1bcd2e7353e8

commit 5e80aa85a179f05d664a003574ad1bcd2e7353e8
Author: Jay Civelli <jcivelli@google.com>
Date: Fri Jun 09 22:58:37 2017

JNI Generator: make MainDex annotation work with 'implements'.

Make the JNI generator correctly parse the MainDex annotation for
classes that implement interfaces or extend other classes.

BUG= 731878 

Change-Id: I20525c48152607e63d0f1b52877b67fde7a62e0f
Reviewed-on: https://chromium-review.googlesource.com/530046
Commit-Queue: Jay Civelli <jcivelli@chromium.org>
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478441}
[modify] https://crrev.com/5e80aa85a179f05d664a003574ad1bcd2e7353e8/base/android/jni_generator/jni_generator.py
[modify] https://crrev.com/5e80aa85a179f05d664a003574ad1bcd2e7353e8/base/android/jni_generator/jni_generator_tests.py

Status: Fixed (was: Untriaged)

Sign in to add a comment