在 ... 中未找到 JNI_OnLoad 正在跳过初始化

No JNI_OnLoad found in ... skipping init(在 ... 中未找到 JNI_OnLoad 正在跳过初始化)

本文介绍了在 ... 中未找到 JNI_OnLoad 正在跳过初始化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在过去一天左右一直收到此消息,直到现在它还没有造成问题.我早些时候让我的代码与我的本机库一起运行,但今天我添加了一些新函数,但它再次不起作用.

I've been getting this message for the past day or so, and up until now it hasn't caused a problem. I got my code to run with my native library earlier but today I added a few new functions and again it will not work.

LogCat 中没有显示错误,但我的程序只是在我的设备上立即打开和关闭.没有消息说应用程序已意外停止,只是屏幕上出现黑色闪烁.

There are no errors displayed in LogCat, but my program just opens and closes instantly on my device. There is no message saying that the application has stopped unexpectedly, just a black flash across the screen.

我查看了 google 和 SO,但出现此消息的原因有很多.这是我的 LogCat:

I have looked around google and SO but there are SO many different reasons for this message to come up. Here is my LogCat :

08-03 10:44:50.186: D/dalvikvm(2143): Trying to load lib /data/data/my.eti.commander/lib/libRelayAPI.so 0x40514f58
08-03 10:44:50.186: D/dalvikvm(2143): Added shared lib /data/data/my.eti.commander/lib/libRelayAPI.so 0x40514f58
08-03 10:44:50.186: D/dalvikvm(2143): No JNI_OnLoad found in /data/data/my.eti.commander/lib/libRelayAPI.so 0x40514f58, skipping init
08-03 10:44:50.288: I/DEBUG(1058): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-03 10:44:50.288: I/DEBUG(1058): Build fingerprint: 'LENOVO/IdeaPad_Tablet_A1_07/A1_07:2.3.4/GRJ22/eng.user.20120209.100319:user/release-keys'

我想知道的是:

1) 这个 No JNI_OnLoad 消息是否导致我的程序无法打开?

1) Is this No JNI_OnLoad message causing my program to not open?

2) 如果是这样,我知道我没有发布任何代码,但有人可以解释一下这条消息的大致意思.包括它正在跳过的 init 内容.

2) If so, I know I have none of my code posted, but could someone explain the general idea of this message. Including what init it is skipping.

我今天添加的新功能在发生这种情况时被注释掉了.我最初遇到了另一个错误,并想确保我的旧代码仍然有效.

The new functions I added today were commented out when this happened. I had originally gotten a different error, and wanted to make sure my old code was still working.

推荐答案

函数JNI_OnLoad不是必须的.因此,如果您没有提供此功能,您的程序应该可以正常运行.

The function JNI_OnLoad is not essential. Thus, if you have not provided this function, your program should run normally.

您的问题来自代码的另一部分.尝试使用 ndk-gdb 修复它.

Your problem come from another part of your code. Try to use ndk-gdb to fix it.

这篇关于在 ... 中未找到 JNI_OnLoad 正在跳过初始化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:在 ... 中未找到 JNI_OnLoad 正在跳过初始化

基础教程推荐