mintware-de / flutter_barcode_reader

A flutter plugin for reading 2D barcodes and QR codes.
MIT License
628 stars 462 forks source link

android.content.ActivityNotFoundException: Unable to find explicit activity class #100

Closed corjanbos closed 5 years ago

corjanbos commented 5 years ago

I installed the pluging as required but I am getting the following error:

android.content.ActivityNotFoundException: Unable to find explicit activity class {nl.serac.serac14133flutter/com.apptreesoftware.barcodescan.BarcodeScannerActivity}; have you declared this activity in your AndroidManifest.xml?

Here's my AndroidManifest.xml.

<application
        android:name="io.flutter.app.FlutterApplication"
        android:label="serac_14133_flutter"
        android:icon="@mipmap/ic_launcher">
        <activity
            android:name=".MainActivity"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <!-- This keeps the window background of the activity showing
                 until Flutter renders its first frame. It can be removed if
                 there is no splash screen (such as the default splash screen
                 defined in @style/LaunchTheme). -->
            <meta-data
                android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
                android:value="true" />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <activity
            android:name="com.apptreesoftware.barcodescan.BarcodeScannerActivity"
            android:exported="true"
            />
    </application>
</manifest>

I can see Flutter is putting my package name as a prefix to the activity name, but I don't know how to solve this.

Help would be appreciated

fabiangebert commented 5 years ago

see #26, does it work in production mode?

corjanbos commented 5 years ago

Yes, it works in production mode!! (question remaining: why not in developement mode...)

Thank you for your quick reply, saves me a big headache