繁体   English   中英

清单中引用的类 com.example.bottomnav.ClientBottomNav 在项目或库中未找到

[英]Class referenced in the manifest, com.example.bottomnav.ClientBottomNav, was not found in the project or the libraries

com.example.bottomnav.ClientBottomNav存在于项目中仍然在 android 清单中,它显示以下错误-

Class referenced in the manifest, com.example.bottomnav.ClientBottomNav, was not found in the project or the libraries  Unresolved class 'ClientBottomNav' 

正如您在图像中看到的,该项目包含所有必要的类。图片

清单中定义的包很可能与您在项目中拥有的包不匹配,因此您仅使用对类名的引用无法解析它。 检查清单顶部的标签“package”。

你应该有类似的东西:

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.bottomnav"
    android:versionCode="1"
    android:versionName="1.0" >

您也可以尝试在活动声明中设置完整路径,例如:

<activity android:name="com.example.bottomnav.ClientBottomNav" 
android:label="ClientBottomNav">

此外,请确保您不在清单中声明片段,只需要声明活动。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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