zoukankan      html  css  js  c++  java
  • android.content.ActivityNotFoundException: Unable to find explicit activity class have you declared this activity in your AndroidManifest.xml?

      在整合PullToRefresh的时候出现如下异常

    10-22 23:20:01.826  32331-32331/com.example.news.andoridnewsapp E/AndroidRuntime﹕ FATAL EXCEPTION: main
        Process: com.example.news.andoridnewsapp, PID: 32331
        android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.news.andoridnewsapp/com.example.news.andoridnewsapp.PullToRefreshListFragmentActivity}; have you declared this activity in your AndroidManifest.xml?
                at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628)
                at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
                at android.app.Activity.startActivityForResult(Activity.java:3442)
                at android.app.Activity.startActivityForResult(Activity.java:3403)
                at android.support.v4.app.FragmentActivity.startActivityFromFragment(FragmentActivity.java:813)
                at android.support.v4.app.FragmentActivity$HostCallbacks.onStartActivityFromFragment(FragmentActivity.java:871)
                at android.support.v4.app.Fragment.startActivity(Fragment.java:916)
                at com.example.news.andoridnewsapp.NavigationDrawerFragment$1.onItemClick(NavigationDrawerFragment.java:137)
                at android.widget.AdapterView.performItemClick(AdapterView.java:299)
                at android.widget.AbsListView.performItemClick(AbsListView.java:1115)
                at android.widget.AbsListView$PerformClick.run(AbsListView.java:2913)
                at android.widget.AbsListView$3.run(AbsListView.java:3680)
                at android.os.Handler.handleCallback(Handler.java:733)
                at android.os.Handler.dispatchMessage(Handler.java:95)
                at android.os.Looper.loop(Looper.java:136)
                at android.app.ActivityThread.main(ActivityThread.java:5047)
                at java.lang.reflect.Method.invokeNative(Native Method)
                at java.lang.reflect.Method.invoke(Method.java:515)
                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
                at dalvik.system.NativeStart.main(Native Method)

      解决办法:

      在主工程的AndroidManifest.xml中添加声明

    <activity android:name=".PullToRefreshListFragmentActivity"></activity>
  • 相关阅读:
    4.变量与运算符
    2.python的基本数据类型
    bzoj 2337: [HNOI2011]XOR和路径
    bzoj 2109: [Noi2010]Plane 航空管制
    bzoj 1566: [NOI2009]管道取珠
    bzoj 3439: Kpm的MC密码
    bzoj 2957: 楼房重建
    十、mysql之索引原理与慢查询优化
    九、MySQL 5.7.9版本sql_mode=only_full_group_by问题
    八、多表查询
  • 原文地址:https://www.cnblogs.com/rwxwsblog/p/4903438.html
Copyright © 2011-2022 走看看