No Activity found to handle Intent { act=com.application.activity.MainActivity }

No Activity found to handle Intent { act=com.application.activity.MainActivity }

 create 2 packges : one for mainactivity, another for login interface
Here's the file AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>  
<manifest xmlns:android="http://schemas.android.com/apk/res/android
    package="com.application.activity" 
    android:versionCode="1" 
    android:versionName="1.0" >  
 
    <uses-sdk  
        android:minSdkVersion="8" 
        android:targetSdkVersion="17" />  
 
    <application  
        android:allowBackup="true" 
        android:icon="@drawable/ic_launcher" 
        android:label="@string/app_name" 
        android:theme="@style/AppTheme" >  
        <activity  
            android:name="com.application.login.Login" 
            android:label="@string/app_name" >  
            <intent-filter>  
                <action android:name="android.intent.action.MAIN" />  
 
                <category android:name="android.intent.category.LAUNCHER" />  
            </intent-filter>  
        </activity>  
          
        <activity  
            android:name=".activity.MAINACTIVITY" 
             android:configChanges="orientation|keyboardHidden" 
            android:label="@string/app_name" >  
            <intent-filter>  
                <action android:name="com.application.activity.MAINACTIVITY" />  
 
                <category android:name="android.intent.category.DEFAULT" />  
            </intent-filter>  
        </activity>  
          
    </application>  
 
</manifest> 
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.application.activity"
    android:versionCode="1"
    android:versionName="1.0" >

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

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.application.login.Login"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
       
        <activity
            android:name=".activity.MAINACTIVITY"
             android:configChanges="orientation|keyboardHidden"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="com.application.activity.MAINACTIVITY" />

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

</manifest>

here's the Login class :

package com.application.login;  
 
import java.util.ArrayList;  
 
import android.app.Activity;  
import android.app.Dialog;  
import android.content.Intent;  
import android.os.Bundle;  
import android.view.View;  
import android.widget.Button;  
import android.widget.EditText;  
import android.widget.TextView;  
 
import com.application.activity.R;  
 
public class Login extends Activity  implements View.OnClickListener{  
      
    ArrayList<Integer> tabid = new ArrayList <Integer>();  
    ArrayList <Double> tabpass = new ArrayList <Double>();  
    Button login;  
    Button cancel;  
    EditText id;  
    EditText pass;  
    int n= tabid.size();  
    int m= tabpass.size();  
      
    protected void onCreate(Bundle savedInstanceState) {  
        super.onCreate(savedInstanceState);  
        setContentView(R.layout.login);  
 
      
 
        DatabaseLogin db = new DatabaseLogin(this);  
        db.open();  
        tabid = db.getIdentifiant();//tableau contient  tout les identifiant   
        tabpass = db.getPassword();//tableau contient tout les mot de passe  
      
        initialize();  
 
        login.setOnClickListener(this);  
        cancel.setOnClickListener(this);  
          
        db.close();  
    }  
 
    private void initialize() {  
        // TODO Auto-generated method stub  
        login =(Button) findViewById(R.id.blogin);  
        cancel =(Button) findViewById(R.id.bcancel);  
        id = (EditText) findViewById(R.id.edtid);  
        pass = (EditText) findViewById(R.id.edtpassword);  
 
    }  
      
      
 
    @Override 
    public void onClick(View v) {  
        // TODO Auto-generated method stub  
        switch(v.getId())  
        {  
 &nbs

[1] [2] [3] Next

Copyright © 2007-2012 www.chuibin.com Chuibin Copyright