Home > Back-end >  Class referenced in the manifest, was not found in the project or libraries
Class referenced in the manifest, was not found in the project or libraries

Time:05-19

I wonder why in the manifest it has error at the com.yalantis.ucrop.UCropActivity although I've put the dependencies and repositories correctly. What went wrong?

<activity
            android:name="*com.yalantis.ucrop.UCropActivity*"
            android:screenOrientation="portrait"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>

CodePudding user response:

<activity
        android:name=".UCropActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>

CodePudding user response:

The path preceding the class name UCropActivity is the package. The package is defined in the class, at the top, and in the manifest, also at the top. If it is the same package, you don't need to include it in the class name in the manifest; you can enter just the class name preceded by a period: .UCropActivity.

It is no error to include the package in the activity name, but no asterisks should be used. Thus, the expression android:name="*com.yalantis.ucrop.UCropActivity*" is invalid.

If you have different packages in the class and the manifest, the package must be included in the activity name.

  • Related