zengxiange / tesseract-android-tools

Automatically exported from code.google.com/p/tesseract-android-tools
0 stars 0 forks source link

Getting Error : Could not find tesseract-android-tools.apk #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Iam using Eclipse for developing android app.

while testing tesseract API I got this error: " tesseract-android-tools] Could 
not find tesseract-android-tools.apk! " what does it mean and what should i do 
please help!

below is the code Iam using and there is no error in this code :

package ocr.text.phase1;

import java.io.File;

import com.googlecode.leptonica.android.Pix;
import com.googlecode.leptonica.android.ReadFile;
import com.googlecode.tesseract.android.TessBaseAPI;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.util.Log;
import android.widget.ImageView;

public class OcrtextActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

 TessBaseAPI api = new TessBaseAPI();
        boolean ok = api.init("D:/android/workspace/tesseract-android-tools/tessdata/", "eng");
        String testImg = getFilesDir().toString() + "/javac.jpg";
        File f = new File(testImg);

        ImageView im = new ImageView(null);
        Bitmap bm = BitmapFactory.decodeFile(testImg);
        im.setImageBitmap(bm);
        if (f == null || !f.canRead() || f.length()<1 ) {
          Log.e("ocr", testImg+ " is not readable");
        } else {
          Log.i("ocr", "Trying to read file");
          Pix px = ReadFile.readFile(f);

        }
    }
    }

What version of the product are you using? On what operating system?

My Eclipse version is : Helios Service Release 2

Operating System is : Windows XP

Please Reply as soon as possible Iam waiting! thanks!

Original issue reported on code.google.com by tahir90....@gmail.com on 11 Dec 2011 at 7:41

GoogleCodeExporter commented 9 years ago
Should be obsolete. Make sure you are using the latest Android ADT, have both 
Eclipse projects open, and have successfully built both projects.

Original comment by alanv@google.com on 11 Sep 2012 at 8:08