Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1053] Titanium Module Start Activity:android.content.ActivityNotFoundException

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2015-09-30T02:54:23.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator Modules
Labelsandroid, api
Reporterbinchen
AssigneeShak Hossain
Created2015-05-08T01:38:21.000+0000
Updated2016-03-08T07:37:23.000+0000

Description

Hi all: I created a titanium module project which will be add to a Titanium Android Project.In the module,I want to start my custom activity,but I failed.The studio reported: [WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x40cd6930) [ERROR] : TiApplication: (main) [5,1363] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.geostar.com.TwoWindows/org.appcelerator.titanium.TiActivity}: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.geostar.com.testactivity/com.geostar.com.testactivity.TestPage}; have you declared this activity in your AndroidManifest.xml?; Titanium 3.5.1,2015/03/05 10:08,96875c9 [ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.geostar.com.TwoWindows/org.appcelerator.titanium.TiActivity}: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.geostar.com.testactivity/com.geostar.com.testactivity.TestPage}; have you declared this activity in your AndroidManifest.xml? [ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2198) [ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivi [ERROR] : TiApplication: at android.app.ActivityThread.access$600(ActivityThread.java:145) [ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:99) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:137) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5117) [ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:511) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:954) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:721) [ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method) [ERROR] : TiApplication: Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.geostar.com.testactivity/com.geostar.com.testactivity.TestPage}; have you declared this activity in your AndroidManifest.xml? [ERROR] : TiApplication: at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1629) [ERROR] : TiApplication: at android.app.Instrumentation.execStartActivity(Instrumentation.java:1428) [ERROR] : TiApplication: at android.app.Activity.startActivityForResult(Activity.java:3426) [ERROR] : TiApplication: at android.app.Activity.startActivityForResult(Activity.java:3366) [ERROR] : TiApplication: at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:839) [ERROR] : TiApplication: at android.app.Activity.startActivity(Activity.java:3622) [ERROR] : TiApplication: at android.app.Activity.startActivity(Activity.java:3590) [ERROR] : TiApplication: at com.geostar.com.testactivity.ExampleProxy.createView(ExampleProxy.java:86) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:483) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:469) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:507) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:491) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:469) [ERROR] : TiApplication: at ti.modules.titanium.ui.widget.tabgroup.TiUIAbstractTab.getContentView(TiUIAbstractTab.java:58) [ERROR] : TiApplication: at ti.modules.titanium.ui.widget.tabgroup.TiUIActionBarTab$TabFragment.onCreateView(TiUIActionBarTab.java:39) [ERROR] : TiApplication: at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500) [ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:938) [ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1115) [ERROR] : TiApplication: at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682) [ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1478) [ERROR] : TiApplication: at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:570) [ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.onStart(TiBaseActivity.java:1148) [ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1168) [ERROR] : TiApplication: at android.app.Activity.performStart(Activity.java:5213) [ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2171) [ERROR] : TiApplication: ... 11 more According to the debug-info,I changed the timodule.xml and declared the activity TestPage in it,which is the following: http://schemas.android.com/apk/res/android"> After this step,I rebuild the module and re-add it into the Titanium App project and run.The problem is still not solved.Who can tell me why and how to solve?Thanks a lot. The attachment include the app project and the module project source codes.

Attachments

FileDateSize
TestPage.zip2015-05-08T01:37:07.000+00003399

Comments

  1. Motiur Rahman 2015-09-02

    Hello, I have tested default module and various GitHub modules and did not get any error result so far. So I recommend you to follow this [Android Module Development Guide](http://docs.appcelerator.com/platform/latest/#!/guide/Android_Module_Development_Guide latest build) and Github Module then let us know if you get the error again. *Testing Environment:* Command-Line Interface, version 4.1.2, Ti SDK: 4.1.0.GA, Android Version: 4.2.2, 4.4.2, 5.1.0, Studio Version: 4.1.1 Thanks.

JSON Source