IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

API standards et tierces Android Discussion :

Problème avec la création d'une page d'inscription/connexion


Sujet :

API standards et tierces Android

  1. #1
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2013
    Messages
    25
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2013
    Messages : 25
    Points : 12
    Points
    12
    Par défaut Problème avec la création d'une page d'inscription/connexion
    Bonjour, je suis en train d'essayer de développer une application de service, et j'ai un problème avec la page de connexion/inscription que j'ai crée. Voilà le truc:
    Nom : vision appli.PNG
Affichages : 268
Taille : 54,0 Ko

    quand je clique sur le bouton Meine Daten (mes données pour ceux qui ne parlent pas allemand ) j'arrive bien sur la page MeineDatenActivity, par contre quand je clique sur Verbindung (connexion) ou Anmeldung (inscription) l'appli plante, ça me met un message et puis revient à l'activité principale. Mais quand j'enlève la partie de code correspondant à l'action sur le bouton Anmeldung par exemple, alors là le bouton Verbindung fonctionne (enfin pas tout à fait comme je le voudrais mais c'est une autre affaire).

    Voilà le code correspondant à MeineDatenActivity, j'espère que quelqu'un pourra m'aider parce que je suis sur ce problème depuis un petit moment là:

    Code Java : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    package com.blabla.blablaapp;
     
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
     
    import android.app.Activity;
    import android.content.Intent;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.Button;
    import android.widget.EditText;
    import android.widget.Toast;
     
    public class MeineDatenActivity extends Activity {
     
    	final String EXTRA_LOGIN = "user_login";
    	final String EXTRA_PASSWORD = "user_password";
     
    	public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_meine_daten);
     
            final EditText login = (EditText) findViewById(R.id.user_email);
            final EditText pass = (EditText) findViewById(R.id.user_password);
     
            final Button loginButton = (Button) findViewById(R.id.verbindung);
            loginButton.setOnClickListener(new View.OnClickListener() {
     
            public void onClick(View v) {
            	final String loginTxt = login.getText().toString();
            	Pattern p = Pattern.compile(".+@.+\\.[a-z]+");
            	Matcher m = p.matcher(loginTxt);
            	if (!m.matches()) {
            		Toast.makeText(MeineDatenActivity.this, R.string.email_format_error,
            		        Toast.LENGTH_SHORT).show();
            				return;
            	}
     
            	final String loginTxt1 = login.getText().toString();
            	final String passTxt1 = pass.getText().toString();
     
            	if (loginTxt1.equals("") || passTxt1.equals("")) {
            		Toast.makeText(MeineDatenActivity.this,
            			R.string.email_or_password_empty,
            			Toast.LENGTH_SHORT).show();
            		return;
            	}
     
          	Intent intent = new Intent(MeineDatenActivity.this, LoginDisplayActivity.class);
          	intent.putExtra(EXTRA_LOGIN, login.getText().toString());
        	intent.putExtra(EXTRA_PASSWORD, pass.getText().toString());
          	startActivity(intent);
          	}
          });
     
            final Button inscriptionButton = (Button) findViewById(R.id.anmeldung);
      	  inscriptionButton.setOnClickListener(new View.OnClickListener() {
     
      	  @Override
      	  public void onClick(View v) {
      		Intent intent = new Intent(MeineDatenActivity.this, InscriptionActivity.class);
      		startActivity(intent);
      		}
      	});
    	}
    }


    Merci d'avance!

  2. #2
    Modérateur
    Avatar de Hizin
    Homme Profil pro
    Développeur mobile
    Inscrit en
    Février 2010
    Messages
    2 180
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 35
    Localisation : France

    Informations professionnelles :
    Activité : Développeur mobile

    Informations forums :
    Inscription : Février 2010
    Messages : 2 180
    Points : 5 072
    Points
    5 072
    Par défaut
    Si ça plante, tu as une jolie stacktrace dans le LogCat, merci de nous la fournir (complète, en texte, en indiquant la correspondance ligne indiquée <-> code montré si tu sais les lire).
    C'est Android, PAS Androïd, ou Androïde didiou !
    Le premier est un OS, le second est la mauvaise orthographe du troisième, un mot français désignant un robot à forme humaine.

    Membre du comité contre la phrase "ça marche PAS" en titre et/ou explication de problème.

    N'oubliez pas de consulter les FAQ Android et les cours et tutoriels Android

  3. #3
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2013
    Messages
    25
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2013
    Messages : 25
    Points : 12
    Points
    12
    Par défaut
    Voila le logcat, par contre je sais pas du tout comment lire ça:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    06-13 07:58:45.943: I/Choreographer(1014): Skipped 61 frames!  The application may be doing too much work on its main thread.
    06-13 07:58:47.043: D/gralloc_goldfish(1014): Emulator without GPU emulation detected.
    06-13 07:59:30.763: I/Choreographer(1014): Skipped 286 frames!  The application may be doing too much work on its main thread.
    06-13 07:59:34.943: I/Choreographer(1014): Skipped 120 frames!  The application may be doing too much work on its main thread.
    06-13 07:59:36.483: I/Choreographer(1014): Skipped 34 frames!  The application may be doing too much work on its main thread.
    06-13 07:59:37.913: I/Choreographer(1014): Skipped 259 frames!  The application may be doing too much work on its main thread.
    06-13 07:59:43.903: I/Choreographer(1014): Skipped 37 frames!  The application may be doing too much work on its main thread.
    06-13 08:00:01.453: D/dalvikvm(1014): GC_FOR_ALLOC freed 176K, 8% free 3102K/3348K, paused 66ms, total 85ms
    06-13 08:01:17.363: I/Choreographer(1014): Skipped 31 frames!  The application may be doing too much work on its main thread.
    06-13 08:01:19.633: I/Choreographer(1014): Skipped 82 frames!  The application may be doing too much work on its main thread.
    06-13 08:01:19.963: I/Choreographer(1014): Skipped 120 frames!  The application may be doing too much work on its main thread.
    06-13 08:01:20.523: I/Choreographer(1014): Skipped 268 frames!  The application may be doing too much work on its main thread.
    06-13 08:01:20.743: I/Choreographer(1014): Skipped 39 frames!  The application may be doing too much work on its main thread.
    06-13 08:01:22.083: I/Choreographer(1014): Skipped 384 frames!  The application may be doing too much work on its main thread.
    06-13 08:01:50.293: I/Choreographer(1014): Skipped 64 frames!  The application may be doing too much work on its main thread.
    06-13 08:01:51.733: I/Choreographer(1014): Skipped 208 frames!  The application may be doing too much work on its main thread.
    06-13 08:02:00.373: I/Choreographer(1014): Skipped 213 frames!  The application may be doing too much work on its main thread.
    06-13 08:02:01.493: I/Choreographer(1014): Skipped 73 frames!  The application may be doing too much work on its main thread.
    06-13 08:02:07.083: I/Choreographer(1014): Skipped 36 frames!  The application may be doing too much work on its main thread.
    06-13 08:02:07.173: I/Choreographer(1014): Skipped 30 frames!  The application may be doing too much work on its main thread.
    06-13 08:02:30.973: I/Choreographer(1014): Skipped 53 frames!  The application may be doing too much work on its main thread.
    06-13 08:02:32.053: W/IInputConnectionWrapper(1014): showStatusIcon on inactive InputConnection
    06-13 08:28:50.963: I/Choreographer(1014): Skipped 72 frames!  The application may be doing too much work on its main thread.
    06-13 08:28:51.483: I/Choreographer(1014): Skipped 110 frames!  The application may be doing too much work on its main thread.
    06-13 08:28:56.233: I/Choreographer(1014): Skipped 160 frames!  The application may be doing too much work on its main thread.
    06-13 08:28:56.953: I/Choreographer(1014): Skipped 85 frames!  The application may be doing too much work on its main thread.
    06-13 08:28:57.303: I/Choreographer(1014): Skipped 57 frames!  The application may be doing too much work on its main thread.
    06-13 08:29:04.693: I/Choreographer(1014): Skipped 149 frames!  The application may be doing too much work on its main thread.
    06-13 08:29:05.353: D/dalvikvm(1014): GC_FOR_ALLOC freed 365K, 12% free 3250K/3684K, paused 355ms, total 365ms
    06-13 08:29:05.873: I/Choreographer(1014): Skipped 59 frames!  The application may be doing too much work on its main thread.
    06-13 08:29:09.833: I/Choreographer(1014): Skipped 118 frames!  The application may be doing too much work on its main thread.
    06-13 08:29:10.783: I/Choreographer(1014): Skipped 55 frames!  The application may be doing too much work on its main thread.
    06-13 08:29:39.703: I/Choreographer(1014): Skipped 158 frames!  The application may be doing too much work on its main thread.
    06-13 08:29:42.533: I/Choreographer(1014): Skipped 473 frames!  The application may be doing too much work on its main thread.
    06-13 08:29:51.193: I/Choreographer(1014): Skipped 79 frames!  The application may be doing too much work on its main thread.
    06-13 08:29:51.753: I/Choreographer(1014): Skipped 77 frames!  The application may be doing too much work on its main thread.
    06-13 08:29:53.863: I/Choreographer(1014): Skipped 124 frames!  The application may be doing too much work on its main thread.
    06-13 08:29:55.523: I/Choreographer(1014): Skipped 197 frames!  The application may be doing too much work on its main thread.
    06-13 08:30:10.993: I/Choreographer(1014): Skipped 32 frames!  The application may be doing too much work on its main thread.
    06-13 08:30:39.473: I/Choreographer(1014): Skipped 179 frames!  The application may be doing too much work on its main thread.
    06-13 08:30:40.183: I/Choreographer(1014): Skipped 87 frames!  The application may be doing too much work on its main thread.
    06-13 08:30:40.573: I/Choreographer(1014): Skipped 37 frames!  The application may be doing too much work on its main thread.
    06-13 08:30:48.733: I/Choreographer(1014): Skipped 117 frames!  The application may be doing too much work on its main thread.
    06-13 10:48:33.833: I/Choreographer(1204): Skipped 32 frames!  The application may be doing too much work on its main thread.
    06-13 10:48:33.923: D/gralloc_goldfish(1204): Emulator without GPU emulation detected.
    06-13 10:48:37.143: I/Choreographer(1204): Skipped 212 frames!  The application may be doing too much work on its main thread.
    06-13 10:48:38.863: I/Choreographer(1204): Skipped 67 frames!  The application may be doing too much work on its main thread.
    06-13 10:48:39.913: I/Choreographer(1204): Skipped 217 frames!  The application may be doing too much work on its main thread.
    06-13 10:48:43.593: D/dalvikvm(1204): GC_FOR_ALLOC freed 123K, 6% free 3114K/3312K, paused 59ms, total 66ms
    06-13 10:48:44.123: I/Choreographer(1204): Skipped 234 frames!  The application may be doing too much work on its main thread.
    06-13 10:48:46.273: W/InputEventReceiver(1204): Attempted to finish an input event but the input event receiver has already been disposed.
    06-13 10:48:46.433: I/Choreographer(1204): Skipped 91 frames!  The application may be doing too much work on its main thread.
    06-13 10:48:58.423: W/IInputConnectionWrapper(1204): showStatusIcon on inactive InputConnection
    06-13 10:49:07.693: I/Choreographer(1204): Skipped 60 frames!  The application may be doing too much work on its main thread.
    06-13 10:49:08.363: I/Choreographer(1204): Skipped 341 frames!  The application may be doing too much work on its main thread.
    06-13 10:49:11.843: I/Choreographer(1204): Skipped 64 frames!  The application may be doing too much work on its main thread.
    06-13 10:49:17.593: I/Choreographer(1204): Skipped 94 frames!  The application may be doing too much work on its main thread.
    06-13 10:49:18.783: I/Choreographer(1204): Skipped 705 frames!  The application may be doing too much work on its main thread.
    06-13 10:49:20.173: I/Choreographer(1204): Skipped 85 frames!  The application may be doing too much work on its main thread.
    06-13 10:49:21.453: I/Choreographer(1204): Skipped 33 frames!  The application may be doing too much work on its main thread.
    06-13 10:49:25.043: D/AndroidRuntime(1204): Shutting down VM
    06-13 10:49:25.043: W/dalvikvm(1204): threadid=1: thread exiting with uncaught exception (group=0xb4b00ba8)
    06-13 10:49:25.093: E/AndroidRuntime(1204): FATAL EXCEPTION: main
    06-13 10:49:25.093: E/AndroidRuntime(1204): Process: com.esiemensbt.siemensbtserviceapp, PID: 1204
    06-13 10:49:25.093: E/AndroidRuntime(1204): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.esiemensbt.siemensbtserviceapp/com.esiemensbt.siemensbtserviceapp.InscriptionActivity}; have you declared this activity in your AndroidManifest.xml?
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.app.Activity.startActivityForResult(Activity.java:3424)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.app.Activity.startActivityForResult(Activity.java:3385)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.app.Activity.startActivity(Activity.java:3627)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.app.Activity.startActivity(Activity.java:3595)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at com.esiemensbt.siemensbtserviceapp.MeineDatenActivity$2.onClick(MeineDatenActivity.java:62)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.view.View.performClick(View.java:4438)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.view.View$PerformClick.run(View.java:18422)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.os.Handler.handleCallback(Handler.java:733)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.os.Handler.dispatchMessage(Handler.java:95)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.os.Looper.loop(Looper.java:136)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.app.ActivityThread.main(ActivityThread.java:5017)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at java.lang.reflect.Method.invokeNative(Native Method)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at java.lang.reflect.Method.invoke(Method.java:515)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at dalvik.system.NativeStart.main(Native Method)
    06-13 10:49:31.013: I/Process(1204): Sending signal. PID: 1204 SIG: 9
    06-13 10:49:32.803: I/Choreographer(1240): Skipped 76 frames!  The application may be doing too much work on its main thread.
    06-13 10:49:32.863: D/gralloc_goldfish(1240): Emulator without GPU emulation detected.
    J'ai lancé l'appli à la ligne 61 et le premier message d'erreur est à la ligne 63

  4. #4
    Modérateur
    Avatar de Hizin
    Homme Profil pro
    Développeur mobile
    Inscrit en
    Février 2010
    Messages
    2 180
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 35
    Localisation : France

    Informations professionnelles :
    Activité : Développeur mobile

    Informations forums :
    Inscription : Février 2010
    Messages : 2 180
    Points : 5 072
    Points
    5 072
    Par défaut
    Ce que l'on appelle "stacktrace", c'est ce bout-là :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    06-13 10:49:25.093: E/AndroidRuntime(1204): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.esiemensbt.siemensbtserviceapp/com.esiemensbt.siemensbtserviceapp.InscriptionActivity}; have you declared this activity in your AndroidManifest.xml?
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.app.Activity.startActivityForResult(Activity.java:3424)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.app.Activity.startActivityForResult(Activity.java:3385)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.app.Activity.startActivity(Activity.java:3627)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.app.Activity.startActivity(Activity.java:3595)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at com.esiemensbt.siemensbtserviceapp.MeineDatenActivity$2.onClick(MeineDatenActivity.java:62)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.view.View.performClick(View.java:4438)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.view.View$PerformClick.run(View.java:18422)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.os.Handler.handleCallback(Handler.java:733)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.os.Handler.dispatchMessage(Handler.java:95)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.os.Looper.loop(Looper.java:136)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at android.app.ActivityThread.main(ActivityThread.java:5017)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at java.lang.reflect.Method.invokeNative(Native Method)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at java.lang.reflect.Method.invoke(Method.java:515)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at dalvik.system.NativeStart.main(Native Method)
    Ce qui nous intéresse principalement ici, ce sont les lignes :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    06-13 10:49:25.093: E/AndroidRuntime(1204): 	at com.esiemensbt.siemensbtserviceapp.MeineDatenActivity$2.onClick(MeineDatenActivity.java:62)
    &
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    06-13 10:49:25.093: E/AndroidRuntime(1204): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.esiemensbt.siemensbtserviceapp/com.esiemensbt.siemensbtserviceapp.InscriptionActivity}; have you declared this activity in your AndroidManifest.xml?
    La première ligne se lit ainsi :
    Il y a une erreur dans le fichier MeineDatenActivity.java, à la ligne 62. La classe en question est MeineDatenActivity (dans une classe interne anonyme), dans le package com.esiemensbt.siemensbtserviceapp. L'erreur à lieu dans la méthode onClick.

    Le message de l'erreur en question est
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Unable to find explicit activity class {com.esiemensbt.siemensbtserviceapp/com.esiemensbt.siemensbtserviceapp.InscriptionActivity}; have you declared this activity in your AndroidManifest.xml?
    Donc, tu as simplement oublié de déclarer ton Activity dans ton manifest
    Fais-le, et tu n'auras plus ce crash

    Ps : prend l'habitude de coder en anglais plutôt que dans une autre langue. C'est plus pratique pour tout le monde pour relire
    C'est Android, PAS Androïd, ou Androïde didiou !
    Le premier est un OS, le second est la mauvaise orthographe du troisième, un mot français désignant un robot à forme humaine.

    Membre du comité contre la phrase "ça marche PAS" en titre et/ou explication de problème.

    N'oubliez pas de consulter les FAQ Android et les cours et tutoriels Android

  5. #5
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2013
    Messages
    25
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2013
    Messages : 25
    Points : 12
    Points
    12
    Par défaut
    Ok je prends note, plus de programmation en allemnad

    Sinon j'ai vérifié dans mon manifeste et j'avais bien déclaré cette activité, regarde:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.esiemensbt.siemensbtserviceapp"
        android:versionCode="1"
        android:versionName="1.0" >
     
        <uses-sdk
            android:minSdkVersion="8"
            android:targetSdkVersion="19" />
     
        <application
            android:allowBackup="true"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
            android:theme="@style/AppTheme" >
            <activity
                android:name="com.blabla.blablaapp.MenuActivity"
                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=".Anleitung"
                android:label="@string/title_activity_anleitung_display" />
             <activity
                android:name=".MeineDatenActivity"
                android:label="@string/title_activity_meine_daten_display" />
              <activity
                android:name=".LoginDisplayActivity"
                android:label="@string/title_activity_login_display" />
              <activity
                android:name=".InscritpionActivity"
                android:label="@string/title_activity_inscription_display" />
              <activity
                android:name=".InscriptionNextActivity"
                android:label="@string/title_activity_inscription_next_display" />
              <activity
                android:name=".KontaktanforderungActivity"
                android:label="@string/title_activity_kontaktanforderung_display" />
              <activity
                android:name=".EquipmentActivity"
                android:label="@string/title_activity_equipment_display" />
              <activity
                android:name=".ServiceMeldungActivity"
                android:label="@string/title_activity_service_meldung_display" />
        </application>
     
    </manifest>
    Alors d'où vient le problème? car j'ai bien déclaré 9 activité pour les 9 créees

  6. #6
    Modérateur
    Avatar de Hizin
    Homme Profil pro
    Développeur mobile
    Inscrit en
    Février 2010
    Messages
    2 180
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 35
    Localisation : France

    Informations professionnelles :
    Activité : Développeur mobile

    Informations forums :
    Inscription : Février 2010
    Messages : 2 180
    Points : 5 072
    Points
    5 072
    Par défaut
    Oui, tu as bien déclaré MeineDatenActivity, mais pas InscriptionActivity
    C'est l'absence de déclaration de InscriptionActivity qui fait crasher
    C'est Android, PAS Androïd, ou Androïde didiou !
    Le premier est un OS, le second est la mauvaise orthographe du troisième, un mot français désignant un robot à forme humaine.

    Membre du comité contre la phrase "ça marche PAS" en titre et/ou explication de problème.

    N'oubliez pas de consulter les FAQ Android et les cours et tutoriels Android

  7. #7
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2013
    Messages
    25
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2013
    Messages : 25
    Points : 12
    Points
    12
    Par défaut
    Aaaah ça marche! merci beaucoup!
    Du coup puis-je en profiter pour te poser une nouvelle question? Car sur cette page de connexion, il y a deux messages qui doivent apparaître en fonction de ce qui est écrit ou pas. Par exemple si je rentre rien dans les champs "email" ou "passwort", je dois avoir un message "email ou mdp vide" et si je ne rentre pas une adresse email dans le champ concerné j'aurai alors le message "format email mauvais" et évidemment si je rentre les bons trucs je me connecte. Or ce qu'il se passe pour le moment c'est que quoi que je fasse (mis à part quand je rentre les bons trucs, ça ça fonctionne) j'ai le message "format email mauvais"....

    Je met le code de l'activité concerné:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    package com.blabla.blablaapp;
     
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
     
    import android.app.Activity;
    import android.content.Intent;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.Button;
    import android.widget.EditText;
    import android.widget.Toast;
     
    public class MeineDatenActivity extends Activity {
     
    	final String EXTRA_LOGIN = "user_login";
    	final String EXTRA_PASSWORD = "user_password";
     
    	public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_meine_daten);
     
            final EditText login = (EditText) findViewById(R.id.user_email);
            final EditText pass = (EditText) findViewById(R.id.user_password);
     
            final Button loginButton = (Button) findViewById(R.id.verbindung);
            loginButton.setOnClickListener(new View.OnClickListener() {
     
            public void onClick(View v) {
            	final String loginTxt = login.getText().toString();
            	Pattern p = Pattern.compile(".+@.+\\.[a-z]+");
            	Matcher m = p.matcher(loginTxt);
            	if (!m.matches()) {
            		Toast.makeText(MeineDatenActivity.this, R.string.email_format_error,
            		        Toast.LENGTH_SHORT).show();
            				return;
            	}
     
            	final String loginTxt1 = login.getText().toString();
            	final String passTxt1 = pass.getText().toString();
     
            	if (loginTxt1.equals("") || passTxt1.equals("")) {
            		Toast.makeText(MeineDatenActivity.this,
            			R.string.email_or_password_empty,
            			Toast.LENGTH_SHORT).show();
            		return;
            	}
     
          	Intent intent = new Intent(MeineDatenActivity.this, LoginDisplayActivity.class);
          	intent.putExtra(EXTRA_LOGIN, login.getText().toString());
        	intent.putExtra(EXTRA_PASSWORD, pass.getText().toString());
          	startActivity(intent);
          	}
          });
     
            final Button inscriptionButton = (Button) findViewById(R.id.anmeldung);
      	  inscriptionButton.setOnClickListener(new View.OnClickListener() {
     
      	  @Override
      	  public void onClick(View v) {
      		Intent intent = new Intent(MeineDatenActivity.this, InscriptionActivity.class);
      		startActivity(intent);
      		}
      	});
    	}
    }

Discussions similaires

  1. [MySQL] Problème avec la création d'une clé étrangère
    Par Biraru dans le forum PHP & Base de données
    Réponses: 4
    Dernier message: 19/08/2011, 15h32
  2. Problème d'affichage avec la création d'une page JSP
    Par alexa87 dans le forum Servlets/JSP
    Réponses: 10
    Dernier message: 28/05/2010, 15h42
  3. Réponses: 6
    Dernier message: 25/03/2010, 19h13
  4. Problème avec plusieurs formulaires dans une page
    Par robindelhuxley dans le forum Ruby on Rails
    Réponses: 5
    Dernier message: 06/11/2008, 10h30
  5. problèmes avec "include file" pour une page asp
    Par chipsense dans le forum ASP
    Réponses: 1
    Dernier message: 02/09/2005, 15h22

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo