zoukankan      html  css  js  c++  java
  • 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文件中为报错的文件根据自身项目相关信息添加相关配置

  • 相关阅读:
    LeetCode 8 有效的括号
    String源码学习
    LeetCode 7最长公共前缀
    LeetCode 5回文数
    LeetCode 6罗马数字转整数
    LeetCode 4.反转整数
    LeetCode 3.无重复字符的最长子串
    区分子串和子序列
    LeetCode 1.两数之和
    一个十分好用的动画工具:Velocity.js
  • 原文地址:https://www.cnblogs.com/mjhjl/p/14901815.html
Copyright © 2011-2022 走看看