Friday, May 24, 2013

[android help] android.content.ActivityNotFoundException, unable to start activity


I am not sure what you are trying to do.


But a couple of suggestions to try.



package="com.eco4cloud.activities" // make sure package name is right


Mention the package name as above



android:name="com.eco4cloud.activities.Main"
// this probably MainActivity. Cross Check once
android:label="@string/app_name" >







Since you have explicit intent you don't require a intent-filter



// use this assuming Datacenters is in package com.eco4cloud.activities
android:name=".Datacenters"
android:label="@string/app_name" >



If you are starting a activity in a non-activity class



public void startDatacenters() {
Intent intent = new Intent(context, Datacenters.class);
// assuming context is the activity content
context.startActivity(intent);
//in your case you have activity.startActivity(intent)
// not sure what activity is
}


.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...