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 8773289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:15:25+00:00 2026-06-13T18:15:25+00:00

This is the full warning: JNI WARNING: instance fieldID 0x571819bc not valid for class

  • 0

This is the full warning:

JNI WARNING: instance fieldID 0x571819bc not valid for class
Ljava/lang/Class; in
Lcom/brokenteapot/lwtemplate/JNI;.onCreate:(Landroid/content/res/AssetManager;)V
(GetIntField)

And the backtrace:

#00  pc 00045dd0  /system/lib/libdvm.so (dvmAbort+75)
#01  pc 00039819  /system/lib/libdvm.so
#02  pc 0003e96b  /system/lib/libdvm.so
#03  pc 000089b9  /system/lib/libandroid.so (AAssetManager_fromJava+88)
#04  pc 00002f54  /data/data/com.brokenteapot.lwtemplate/lib/libLiveWallpaperTemplate.so (Java_com_brokenteapot_lwtemplate_JNI_onCreate+128)

Here is the code that’s causing it:

Java

public final class LiveWallpaperService extends WallpaperService 
{
    static AssetManager assetManager;

    @Override
    public void onCreate()
    {
        assetManager = getAssets();
        JNI.onCreate(assetManager);
    }
}

C++

void Java_com_brokenteapot_lwtemplate_JNI_onCreate(JNIEnv* env, jobject assetManager)
{
    AAssetManager* pAssetManager = AAssetManager_fromJava(env, assetManager);
}

I really have no idea what that warnings means or why it’s crashing. I’m following the example from the NDK samples almost exactly. Is it because it’s a service that something is different?

  • 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-13T18:15:27+00:00Added an answer on June 13, 2026 at 6:15 pm

    Ugh, I figured it out, the method signature was wrong in the JNI function:

    void Java_com_brokenteapot_lwtemplate_JNI_onCreate(JNIEnv* env, jobject assetManager)
    

    should have been

    void Java_com_brokenteapot_lwtemplate_JNI_onCreate(JNIEnv* env, void* reserved, jobject assetManager)
    

    I don’t really understand why some JNI functions need the void* and some don’t…

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

Sidebar

Related Questions

I'm getting this warning. '-respondsToSelector:' not found in protocol(s) It occurs on the line
I am getting Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource
I am getting this error when I execute my page: Warning: mysql_fetch_assoc() : supplied
I had to share this: I got hung up for 2 full days on
This question is not specific to C++, just uses C++ stuff as examples. A
Just to clear it up this is on an actual device and not an
I've inherited a project which throws this warning Incompatible pointer types assigning to 'MKPinAnnotationView
after update to tycho 0.14.0, i'm seeing this warning: [WARNING] Entry: germantechEcfNfe/plugins/org.eclipse.ui.intro.universal_3.2.500.v20110510/themes/slate/graphics/standby/fs_standbyhov.gif longer than
I am following the quickstart guide for boost::spirit, and I get this compiler warning
Why is this warning occuring when I am using IE? Warning: Invalid argument supplied

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.