gpt4 book ai didi

打开 Activity 时Android应用程序崩溃 - 附加堆栈跟踪

转载 作者:行者123 更新时间:2023-12-03 16:21:12 25 4
gpt4 key购买 nike

我对 Android 开发比较陌生;我有一个从网站获取 RSS 提要的应用程序。当我打开 ListView 上显示的文章列表并尝试打开特定文章时,应用程序崩溃。

有人可以告诉我如何解决这个问题吗?

我已将 ACRA 放入应用程序,并通过电子邮件发送崩溃报告。它们在下面输入。帮助将不胜感激!

以下是获得的堆栈跟踪:

    USER_COMMENT=null
ANDROID_VERSION=4.1.2
APP_VERSION_NAME=1.0
BRAND=samsung
PHONE_MODEL=GT-N8000
CUSTOM_DATA=
STACK_TRACE=android.content.ActivityNotFoundException: Unable to find explicit activity class {com.j.infographx/com.j.infographx.DisPlayWebPageActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1556)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1431)
at android.app.Activity.startActivityForResult(Activity.java:3428)
at android.app.Activity.startActivityForResult(Activity.java:3389)
at android.app.Activity.startActivity(Activity.java:3599)
at android.app.Activity.startActivity(Activity.java:3567)
at com.j.infographx.ListRSSItemsActivity$1.onItemClick(ListRSSItemsActivity.java:79)
at android.widget.AdapterView.performItemClick(AdapterView.java:301)
at android.widget.AbsListView.performItemClick(AbsListView.java:1287)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3078)
at android.widget.AbsListView$1.run(AbsListView.java:4161)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)

安卓 list :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.j.infographx"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />

<!-- Internet Permissions -->
<uses-permission android:name="android.permission.INTERNET"/>

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:name="MyApplication">
<activity
android:configChanges="keyboardHidden|orientation"
android:name="com.j.infographx.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<!-- Add New Site Activity -->
<activity android:name=".AddNewSiteActivity"/>

<!-- List rss items Activity -->
<activity android:name=".ListRSSItemsActivity"
android:configChanges="keyboardHidden|orientation"/>

<!-- Display webpage Activity -->
<activity android:name=".DisplayWebPageActivity"
android:theme="@android:style/Theme.NoTitleBar"
android:configChanges="keyboardHidden|orientation"/>
</application>

</manifest>

最佳答案

您必须在 list 中声明 Activity 。像这样:

 <activity
android:name="com.j.infographx.DisPlayWebPageActivity">
</activity>

关于打开 Activity 时Android应用程序崩溃 - 附加堆栈跟踪,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18846099/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com