[英]Class referenced in the manifest was not found in the project or the libraries
最近我嘗試刪除所有 lint 問題,並且在清單中出現了一個問題:
“在清單中引用的類 com.octo.android.robospice.JacksonSpringAndroidSpiceService,在項目或庫中未找到”
<service
android:name="com.octo.android.robospice.JacksonSpringAndroidSpiceService"
android:exported="false" >
</service>
這是一個 maven 依賴項,也包含在 build.gradle 文件中:
dependencies {
...
compile 'com.octo.android.robospice:robospice:1.4.11'
compile 'com.octo.android.robospice:robospice-spring-android:1.4.11'
...
}
還可以做些什么來解決這個 lint 警告,或者我是否必須抑制它?
在我的情況下,我忘記在 kotlin 文件中添加包
package com.user.examplephone;
我知道這是一個老問題,但我今天遇到了類似的問題。 問題出在服務的名稱上。 如果您的項目中有該類,則名稱應為:
<service
android:name="YOUR_PACKAGE.YOUR_CLASS_NAME"
android:exported="false" />
例子:
android:name="com.google.android.gms.oss.licenses.OssLicensesActivity"
android:screenOrientation="portrait"
android:theme="@style/LicensesTheme"
tools:ignore="MissingClass"/>
你需要添加
tools:ignore="MissingClass"
就我而言,在擦洗 SO 以解決此問題之后。 我最終將 MainActivity 的完全限定路徑名放入我的清單和無效緩存中,然后重新啟動。 為我工作。 青年會
轉到文件->無效現金並重新啟動
這個對我有用
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.