Mahmoud Emam
Mahmoud Emam

Reputation: 1527

neuroph fatal error on android

This code is part of my code, that doing OCR on android. I import the neuroph.jar in my project.

I make that code on Netbeans IDE and load on my mobile it run good. but when i run this code on Eclipse IDE the below erro appear ???/

private void loadData() {
    showDialog(LOADING_DATA_DIALOG);
    // load neural network in separate thread with stack size = 32000
    new Thread(null, loadDataRunnable, "dataLoader", 32000).start();
}

private Runnable loadDataRunnable = new Runnable() {
        public void run() {
            // open neural network
            InputStream is = getResources().openRawResource(R.raw.animals_net);
            // load neural network
            nnet = NeuralNetwork.load(is);
            imageRecognition = (ImageRecognitionPlugin) nnet
                    .getPlugin(ImageRecognitionPlugin.class);
            // dismiss loading dialog
            dismissDialog(LOADING_DATA_DIALOG);
        }
    };

Why does the fatal exception appear ???

06-18 15:51:50.097: E/AndroidRuntime(398): FATAL EXCEPTION: dataLoader
06-18 15:51:50.097: E/AndroidRuntime(398): java.lang.NoClassDefFoundError: org.neuroph.core.NeuralNetwork
06-18 15:51:50.097: E/AndroidRuntime(398):  at neuroph.android.example.NeurophActivity$1.run(NeurophActivity.java:102)
06-18 15:51:50.097: E/AndroidRuntime(398):  at java.lang.Thread.run(Thread.java:1096)

Upvotes: 0

Views: 1214

Answers (1)

AndroidCrazy
AndroidCrazy

Reputation: 334

Add the neuroph2.6.jar from here in your buildpath.It will be having all the related class files.

Upvotes: 1

Related Questions