简体   繁体   中英

Class referenced in the manifest was not found in the project or the libraries

Recently I tried to remove all lint issues and in the manifest appeared an issue :
"Class referenced in the manifest, com.octo.android.robospice.JacksonSpringAndroidSpiceService, was not found in the project or the libraries"

    <service
        android:name="com.octo.android.robospice.JacksonSpringAndroidSpiceService"
        android:exported="false" >
    </service>

This is a maven dependency and is also included in the build.gradle file :

dependencies {
  ...
    compile 'com.octo.android.robospice:robospice:1.4.11'
    compile 'com.octo.android.robospice:robospice-spring-android:1.4.11'
   ...
}

What else could be done to resolve this lint warning or do I have to suppress it?

在我的情况下,我忘记在 kotlin 文件中添加包

package com.user.examplephone;

I know it's an old question but I ran into a similar issue today. The problem was in the name of the service. If you had the class in your project, then the name should be:

  <service
        android:name="YOUR_PACKAGE.YOUR_CLASS_NAME"
        android:exported="false" />

Example:

            android:name="com.google.android.gms.oss.licenses.OssLicensesActivity"
            android:screenOrientation="portrait"
            android:theme="@style/LicensesTheme"
            tools:ignore="MissingClass"/>


You need to add

tools:ignore="MissingClass"

In my case, after scrubbing SO for solutions to this. I finally put the fully qualified path name to MainActivity in my manifest, and Invalidated caches, and restarted. Worked for me. YMMV

go to file->Invalidate cashes and restart

it works for me

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM