Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6047211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:19:34+00:00 2026-05-23T07:19:34+00:00

Weird one this, Both my Java and C code seem to be working fine.

  • 0

Weird one this,

Both my Java and C code seem to be working fine. However, when everything is done in the C code and the program would continue through the rest of the Java implementation the below Exception is thrown.

If forced to I’ll simply wrap the call to native code in a try/catch but It worries me that an exception is being thrown for a reason unknown to me? Has anyone seen this before?

JavaCInterface.java (Extends Thread):

static {
    Log.v(JavaCInterface.class.toString(), "Loading native libraries");
    System.loadLibrary("JavaCInterface");
}

public native void cFunction(); 

@Override
public void run() {
    super.run();
    cFunction(); // Exception thrown when control is returned here
    return;
}   

JavaCInterface.cpp:

JNIEXPORT void JNICALL Java_com_test_jni_JavaCInterface_cFunction(JNIEnv * env, jobject thiz)
{
    ... // Stuff happens here
    logVerbose("Leaving Native Code"); // This gets logged fine and is the last line of the native method

}

Weird no? Any thoughts?

ERROR/AndroidRuntime(2379): java.lang.IncompatibleClassChangeError: invoking method from interface not implemented by class
ERROR/AndroidRuntime(2379):     at com.test.jni.JavaCInterface.cFunction(Native Method)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:19:35+00:00Added an answer on May 23, 2026 at 7:19 am

    This error was actually caused by a “GetMethodID” failing unchecked previously in the code. Had to track this down like ViTo said by cutting to code up bit by bit

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may seem weird but I have a problem in one of my programs
This one is weird, I have a page that consists of a html table
This is a bit of a weird one, and I could well be coding
Ok, this is a weird one. The junk data isn't random either, it appears
There seem to be a number of weird things one could do if one
I was doing one of these online Java tests and I was asked this
Does any one have any idea why this would be happening? This is some
This one is weird. Hopefully I will ask the right question: I'm using an
Here's a wierd one. I'm reusing a code base that unfortunately must not be
I'm hoping to get some help with this weird problem. We're running the Jacorb

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.