I am getting the error "Class referenced in the manifest, com.yalantis.ucrop.UCropActivity, was not found in the project or the libraries " when I add an activity to my Android Manifest file. Here is the code which is causing the error:
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
I am trying to install the image_cropper package, and in the installation guide it requires that I add this activity statement to the Android Manifest file. I am using MacOS
What I have tried:
I have followed the note in the installation guide "From v1.2.0, you need to migrate your android project to v2 embedding (detail)"
I ran pub get when I added to my pubspec.yaml
I ran flutter doctor and I have no warnings
Cleaned my flutter project and restarted Android Studio
I had the same problem and realized I made the silliest mistake. I merged an old project into a new one, and my manifest file was in the wrong place. Make sure it's in android/app/src/main