• Android:Unable to find explicit activity class报错


    今天遇到的问题

    Android:Unable to find explicit activity class报错

    错误原因:

    出现这种错误的原因有两个:

        1:一个是在配置文件AndroidManifest.xml里面没有写新的activity的配置信息(如下):

    <activity
                android:name="Ccom.example.message.Message"
                android:label="@string/title_activity_message_web"
                android:theme="@android:style/Theme.NoTitleBar" >
            </activity>

        2:另一个是因为配置文件信息书写错误,好好检查一下,像我上面的配置信息中就多谢了一个C,所以提示错误,我很奇怪为什么编译器不提示,那是因为错误在“ ”里面,编译器发现不了,所以检查的时候要特别注意“ ”里面的信息是否有错误!

    正确的配置信息如下:

    <activity
                android:name="com.example.message.Message"
                android:label="@string/title_activity_message_web"
                android:theme="@android:style/Theme.NoTitleBar" >
            </activity>

    解决方案

    根据提示,在AndroidManifest.xml文件中为报错的文件根据自身项目相关信息添加相关配置

  • 相关阅读:
    CTF简介
    最先与最后
    记一次某校版facemash的搭建
    ipv6入门
    win10开启IPv6的两种方法
    安装 Go 1.11 在 Ubuntu 18.04 & 16.04 LTS
    python开发者的AsyncIO
    Python 异步--Await the Future
    Python元类
    alias 和 unalias 命令
  • 原文地址:https://www.cnblogs.com/mjhjl/p/14901815.html
Copyright © 2020-2023  润新知