这段代码是我的代码的一部分,在android上进行OCR。 我在项目中导入了neuroph.jar。
我在Netbeans IDE上制作该代码并在我的手机上加载它运行良好。 但是当我在Eclipse IDE上运行此代码时,下面的错误显示为??? /
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);
}
};
为什么致命的例外出现???
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)