1

here is the project I got from my tutor, I got the error after running it on my test phone. I tried the answers on stackovetflow but nothing helps. The logcat and manifest.xml are as follows

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.imagerecognition"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8" 
        android:targetSdkVersion="22" />

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />

    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".TakeBusinessCardActivity"
            android:label="@string/app_name">

            <!--<intent-filter>-->
                <!--<action android:name="android.intent.action.MAIN" />-->

                <!--<category android:name="android.intent.category.LAUNCHER" />-->
            <!--</intent-filter>-->
        </activity>
        <activity android:name=".HistoryActivity" android:label="拍摄历史"/>
        <activity android:name=".DecodeActivity" android:label="解码"/>

        <activity android:name=".MainActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

logcat

starkshang
  • 8,228
  • 6
  • 41
  • 52

3 Answers3

0

This following method worked for me. Right click on your project and select properties. The "Properties for " panel will open. From the menu on the left go to Java Build Path -> Order and Export . From the list below uncheck the box next to Android Dependencies. Finally clean your project and run.

Reference : Link

halfer
  • 19,824
  • 17
  • 99
  • 186
Parag Kadam
  • 3,620
  • 5
  • 25
  • 51
0

try to change your

android:name=".MainActivity"

to fully specified name

android:name="com.imagerecognition.MainActivity"

sometime eclipse act weird.

if it does not work you can try this unable to find activity

Community
  • 1
  • 1
CodingRat
  • 1,934
  • 3
  • 23
  • 43
0

Try removing the imports and importing them manually again.