0
05-28 00:29:33.066: D/dalvikvm(2541): Trying to load lib /data/data/com.xxxx.scan.demo/lib/libIAL.so 0x405154e8
05-28 00:29:33.074: D/SDL(2541): [afd4d440] Setting global debug level to 50
05-28 00:29:33.074: D/dalvikvm(2541): Added shared lib /data/data/com.xxxx.scan.demo/lib/libIAL.so 0x405154e8
05-28 00:29:33.074: D/dalvikvm(2541): No JNI_OnLoad found in /data/data/com.xxxx.scan.demo/lib/libIAL.so 0x405154e8, skipping init
05-28 00:29:33.078: D/dalvikvm(2541): Trying to load lib /data/data/com.xxxx.scan.demo/lib/libSDL.so 0x405154e8
05-28 00:29:33.078: D/SDL(2541): [afd4d440] FileRead:stat() FAILED file=[/mnt/sdcard/sdl.conf] errno=2
05-28 00:29:33.078: D/SDL(2541): [afd4d440] SAL_GetSysProperty: [name=I2CDevice, type=1, pvOut=efa3c, nBytes=32] CfgGet FAILED iRet=-100
05-28 00:29:33.078: D/SDL(2541): [afd4d440] SE4500_LX::query_registry_item FAILED for SAL_PropID 4
05-28 00:29:33.078: D/SDL(2541): [afd4d440] SE4500:init_I2C [/dev/moto_sdl]
05-28 00:29:33.078: D/SDL(2541): [afd4d440] FileRead:stat() FAILED file=[/mnt/sdcard/sdl.conf] errno=2
05-28 00:29:33.078: D/SDL(2541): [afd4d440] SAL_GetSysProperty: [name=CamDevice, type=1, pvOut=efa5c, nBytes=32] CfgGet FAILED iRet=-100
05-28 00:29:33.078: D/SDL(2541): [afd4d440] SE4500_LX::query_registry_item FAILED for SAL_PropID 3
05-28 00:29:33.078: D/SDL(2541): [afd4d440] SE4500:init_cam [/dev/video2]
05-28 00:29:33.078: D/dalvikvm(2541): Added shared lib /data/data/com.xxxx.scan.demo/lib/libSDL.so 0x405154e8
05-28 00:29:33.078: D/dalvikvm(2541): No JNI_OnLoad found in /data/data/com.xxxx.scan.demo/lib/libSDL.so 0x405154e8, skipping init
05-28 00:29:33.078: D/dalvikvm(2541): Trying to load lib /data/data/com.xxxx.scan.demo/lib/libbarcodereader.so 0x405154e8
05-28 00:29:33.082: D/dalvikvm(2541): Added shared lib /data/data/com.xxxx.scan.demo/lib/libbarcodereader.so 0x405154e8
05-28 00:29:33.085: E/BCReader-JNI(2541): Can't find com/motorolasolutions/adc/decoder/BarCodeReader
05-28 00:29:33.085: E/BCReader-JNI(2541): Can't find required fields
05-28 00:29:33.085: W/dalvikvm(2541): JNI_OnLoad returned bad version (-1) in /data/data/com.xxxx.scan.demo/lib/libbarcodereader.so 0x405154e8
05-28 00:29:33.085: W/dalvikvm(2541): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/xxxx/scan/demo/ScanActivity;
05-28 00:29:33.085: W/dalvikvm(2541): Class init failed in newInstance call (Lcom/xxxx/scan/demo/ScanActivity;)
05-28 00:29:33.085: D/AndroidRuntime(2541): Shutting down VM
05-28 00:29:33.085: W/dalvikvm(2541): threadid=1: thread exiting with uncaught exception (group=0x40015560)
05-28 00:29:33.089: E/AndroidRuntime(2541): FATAL EXCEPTION: main
05-28 00:29:33.089: E/AndroidRuntime(2541): java.lang.ExceptionInInitializerError
05-28 00:29:33.089: E/AndroidRuntime(2541):     at java.lang.Class.newInstanceImpl(Native Method)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at java.lang.Class.newInstance(Class.java:1409)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1536)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at android.os.Looper.loop(Looper.java:123)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at android.app.ActivityThread.main(ActivityThread.java:3647)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at java.lang.reflect.Method.invokeNative(Native Method)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at java.lang.reflect.Method.invoke(Method.java:507)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at dalvik.system.NativeStart.main(Native Method)
05-28 00:29:33.089: E/AndroidRuntime(2541): Caused by: java.lang.NoClassDefFoundError: com.motorolasolutions.adc.decoder.BarCodeReader
05-28 00:29:33.089: E/AndroidRuntime(2541):     at java.lang.Runtime.nativeLoad(Native Method)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at java.lang.Runtime.loadLibrary(Runtime.java:432)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at java.lang.System.loadLibrary(System.java:554)
05-28 00:29:33.089: E/AndroidRuntime(2541):     at com.xxxx.scan.demo.ScanActivity.<clinit>(ScanActivity.java:93)
05-28 00:29:33.089: E/AndroidRuntime(2541):     ... 15 more
05-28 00:29:33.089: E/AndroidRuntime(2541): Caused by: java.lang.ClassNotFoundException: com.motorolasolutions.adc.decoder.BarCodeReader in loader dalvik.system.PathClassLoader[/data/app/com.xxxx.scan.demo-2.apk]
05-28 00:29:33.089: E/AndroidRuntime(2541):     at 

**ScanActivity.java**


package com.xxxx.scan.demo;

import com.motorolasolutions.adc.decoder.BarCodeReader.BarCodeReader;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.device.ScanManager;
import android.media.AudioManager;
import android.media.ToneGenerator;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

import java.io.IOException;

public class ScanActivity extends Activity implements BarCodeReader.DecodeCallback {
    private static final String TAG = "MagActivity";

    private Button mScanTutton;

    private TextView scanResult;

    private ScanManager mScanManager;

    private int total = 0;

    private int soundid;

    private String ACTION = "xxxx.rcv.message";

    private BroadcastReceiver receiver;

    // BarCodeReader specifics
    private BarCodeReader bcr = null;

    // states
    static final int STATE_IDLE = 0;

    static final int STATE_DECODE = 1;

    static final int STATE_HANDSFREE = 2;

    static final int STATE_PREVIEW = 3; // snapshot preview mode

    static final int STATE_SNAPSHOT = 4;

    static final int STATE_VIDEO = 5;

    private int state = STATE_IDLE;

    private boolean beepMode = true; // decode beep enable

    private int trigMode = BarCodeReader.ParamVal.LEVEL;

    private int decodes = 0;

    // system
    private ToneGenerator tg = null;

    private int motionEvents = 0;

    private int modechgEvents = 0;

    private boolean IsHonyWare = true;

    public static char MIFARE_AUTHENT_A = 0x60;
    static {
        System.loadLibrary("IAL");
            System.loadLibrary("SDL");
line 93     System.loadLibrary("barcodereader");
        }
4

0 回答 0