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

  • SEARCH
  • Home
  • 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 9241249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:20:15+00:00 2026-06-18T08:20:15+00:00

My Android application comprises two parts: frontend written in Java and game written in

  • 0

My Android application comprises two parts: frontend written in Java and game written in C++ using NativeActivity NDK stuff. I have a problem integrating Flurry into my application. Flurry works fine from within Java part, but crashes from within C++.
More specifically, call

jni_env->FindClass("com/flurry/android/FlurryAgent");

results in ClassNotFoundException.

jni_env variable is not broken because I am able to get some Intent params using it.

FlurryAgent.jar is added to libs dir and into .classpath. I’ve even checked ‘Order and Export’ checkbox for FlurryAgent.jar (though I have no idea what does it mean). Nothing helps.

One more detail: my application is divided into Library and App parts. I have added FlurryAgent.jar to both parts and checked ‘Order and Export’ in both parts, but it still does not help. Clean & rebuild does does not help either. Did I miss something?

  • 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-06-18T08:20:16+00:00Added an answer on June 18, 2026 at 8:20 am

    The answer is here: http://archive.is/QzA8

    In other words, NativeActivity cannot find a third-party class and instead of

    jni_env->FindClass("com/flurry/android/FlurryAgent");
    

    one should use

    jobject nativeActivity = state->activity->clazz;
    jclass acl = jni_env->GetObjectClass(nativeActivity);
    jmethodID getClassLoader = jni_env->GetMethodID(acl, "getClassLoader", "()Ljava/lang/ClassLoader;");
    jobject cls = jni_env->CallObjectMethod(nativeActivity, getClassLoader);
    jclass classLoader = jni_env->FindClass("java/lang/ClassLoader");
    jmethodID findClass = jni_env->GetMethodID(classLoader, "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;");
    jstring strClassName = jni_env->NewStringUTF("com.flurry.android.FlurryAgent");
    jclass flurryClass = (jclass)(jni_env->CallObjectMethod(cls, findClass, strClassName));
    jni_env->DeleteLocalRef(strClassName);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a android webservice client application. I am trying to use the java
i upload my application in android market.i have an problem my apk file exceed
My android application compirises two Activities: .MainActivity and android.app.NativeActivity. The latter is implemented purely
I have made an application in android that lets the user compress and decompress
My Android application was working in English and I have to provide the users
My Android application uses Java OAuth library, found here for authorization on Twitter. I
In my java application i have this code @Override public void onAttachedToWindow() { this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
I'm trying to get the android ADK example applications working. The java stuff works
i am developing an android application wherein i have to send a frame in
i have 2 android projects in eclipse, one is the main application, the other

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.