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

Android Discussion :

probléme procedure onCreate()


Sujet :

Android

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    508
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2008
    Messages : 508
    Par défaut probléme procedure onCreate()
    Bonsoir, j'ai un soucie dans ma procedure des lors que je rajoute du code en dessous du setContentView, mon application plante et aucune erreur null part pour me renseigner

    J'ai l'erreur suivante dans mon emulator

    the application has stopped unexpectedly android please try again



    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
    WritableWorkbook wb;
    	WritableSheet ws;
     
    	@Override
    	protected void onCreate(Bundle savedInstanceState) {
    		super.onCreate(savedInstanceState);
    		setContentView(R.layout.activity_main);
     
    		 Filewriter f=new Filewriter();
    	        wb=f.createWorkbook("aa.xls");
    	        ws=f.createSheet(wb, "sheetName", 0);
    	    Toast.makeText(getApplicationContext(), "created", Toast.LENGTH_LONG).show();
    	        try{
    	                f.writeCell(1,1, "success", true, ws);
    	               }catch(RowsExceededException r){} catch(WriteException w){}
    	   }
    Merci les amis, je suis novice en développement android

  2. #2
    Membre confirmé
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Octobre 2011
    Messages
    216
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Octobre 2011
    Messages : 216
    Par défaut
    Salut,

    Regarde et mets les message du LogCat.

    tiens au jus.

  3. #3
    Membre éclairé
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    508
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2008
    Messages : 508
    Par défaut
    Salut, bon j'ai trouver les logCat, donc voila

    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
    02-19 09:07:31.329: I/ActivityManager(69): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.contact/.MainActivity } from pid 141
    02-19 09:07:31.639: I/ActivityManager(69): Start proc com.contact for activity com.contact/.MainActivity: pid=375 uid=10034 gids={}
    02-19 09:07:31.969: D/dalvikvm(32): GC_EXPLICIT freed 10K, 53% free 2538K/5379K, external 410K/517K, paused 300ms
    02-19 09:07:32.309: D/dalvikvm(32): GC_EXPLICIT freed <1K, 53% free 2538K/5379K, external 410K/517K, paused 302ms
    02-19 09:07:32.989: D/dalvikvm(32): GC_EXPLICIT freed <1K, 53% free 2538K/5379K, external 410K/517K, paused 651ms
    02-19 09:07:33.019: W/dalvikvm(375): VFY: unable to find class referenced in signature (Ljxl/write/WritableWorkbook;)
    02-19 09:07:33.029: W/dalvikvm(375): VFY: unable to find class referenced in signature (Ljxl/write/WritableWorkbook;)
    02-19 09:07:33.039: W/dalvikvm(375): VFY: unable to find class referenced in signature (Ljxl/write/WritableSheet;)
    02-19 09:07:33.049: W/dalvikvm(375): VFY: unable to find class referenced in signature (Ljxl/write/WritableSheet;)
    02-19 09:07:33.049: W/dalvikvm(375): VFY: unable to resolve exception class 853 (Ljxl/write/WriteException;)
    02-19 09:07:33.059: W/dalvikvm(375): VFY: unable to find exception handler at addr 0x32
    02-19 09:07:33.059: W/dalvikvm(375): VFY:  rejected Lcom/contact/MainActivity;.onCreate (Landroid/os/Bundle;)V
    02-19 09:07:33.059: W/dalvikvm(375): VFY:  rejecting opcode 0x0d at 0x0032
    02-19 09:07:33.059: W/dalvikvm(375): VFY:  rejected Lcom/contact/MainActivity;.onCreate (Landroid/os/Bundle;)V
    02-19 09:07:33.059: W/dalvikvm(375): Verifier rejected class Lcom/contact/MainActivity;
    02-19 09:07:33.069: W/dalvikvm(375): Class init failed in newInstance call (Lcom/contact/MainActivity;)
    02-19 09:07:33.069: D/AndroidRuntime(375): Shutting down VM
    02-19 09:07:33.069: W/dalvikvm(375): threadid=1: thread exiting with uncaught exception (group=0x40015560)
    02-19 09:07:33.099: E/AndroidRuntime(375): FATAL EXCEPTION: main
    02-19 09:07:33.099: E/AndroidRuntime(375): java.lang.VerifyError: com.contact.MainActivity
    02-19 09:07:33.099: E/AndroidRuntime(375): 	at java.lang.Class.newInstanceImpl(Native Method)
    02-19 09:07:33.099: E/AndroidRuntime(375): 	at java.lang.Class.newInstance(Class.java:1409)
    02-19 09:07:33.099: E/AndroidRuntime(375): 	at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
    02-19 09:07:33.099: E/AndroidRuntime(375): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
    02-19 09:07:33.099: E/AndroidRuntime(375): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
    02-19 09:07:33.099: E/AndroidRuntime(375): 	at android.app.ActivityThread.access$1500(ActivityThread.java:117)
    02-19 09:07:33.099: E/AndroidRuntime(375): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
    02-19 09:07:33.099: E/AndroidRuntime(375): 	at android.os.Handler.dispatchMessage(Handler.java:99)
    02-19 09:07:33.099: E/AndroidRuntime(375): 	at android.os.Looper.loop(Looper.java:123)
    02-19 09:07:33.099: E/AndroidRuntime(375): 	at android.app.ActivityThread.main(ActivityThread.java:3683)
    02-19 09:07:33.099: E/AndroidRuntime(375): 	at java.lang.reflect.Method.invokeNative(Native Method)
    02-19 09:07:33.099: E/AndroidRuntime(375): 	at java.lang.reflect.Method.invoke(Method.java:507)
    02-19 09:07:33.099: E/AndroidRuntime(375): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    02-19 09:07:33.099: E/AndroidRuntime(375): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    02-19 09:07:33.099: E/AndroidRuntime(375): 	at dalvik.system.NativeStart.main(Native Method)
    02-19 09:07:33.129: W/ActivityManager(69):   Force finishing activity com.contact/.MainActivity
    02-19 09:07:33.659: W/ActivityManager(69): Activity pause timeout for HistoryRecord{4069e048 com.contact/.MainActivity}
    02-19 09:07:44.738: W/ActivityManager(69): Activity destroy timeout for HistoryRecord{4069e048 com.contact/.MainActivity}
    Perso j'y comprend pas grand chose

    merci l'ami

  4. #4
    Membre éclairé
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    508
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2008
    Messages : 508
    Par défaut
    De plus voici
    Voici ma class main entiere
    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
    package com.contact;
     
     
    import jxl.write.WritableSheet;
    import jxl.write.WritableWorkbook;
    import jxl.write.WriteException;
    import jxl.write.biff.RowsExceededException;
    import android.app.Activity;
    import android.os.Bundle;
    import android.view.Menu;
    import android.widget.Toast;
     
     
    public class MainActivity extends Activity {
     
    	//WritableWorkbook wb;
    	//WritableSheet ws;
     
    	@Override
    	protected void onCreate(Bundle savedInstanceState) {
    		super.onCreate(savedInstanceState);
    		setContentView(R.layout.activity_main);
     
    		 Filewriter f=new Filewriter();
    		 WritableWorkbook   wb=f.createWorkbook("aa.xls");
    			WritableSheet   ws=f.createSheet(wb, "sheetName", 0);
    	    Toast.makeText(getApplicationContext(), "created", Toast.LENGTH_LONG).show();
    	        try{
    	                f.writeCell(1,1, "success", true, ws);
    	               }catch(RowsExceededException r){} catch(WriteException w){}
    	   }
     
     
    	@Override
    	public boolean onCreateOptionsMenu(Menu menu) {
    		// Inflate the menu; this adds items to the action bar if it is present.
    		getMenuInflater().inflate(R.menu.main, menu);
    		return true;
    	}
    	/*public void createExcel(){
    		JavaExcelWrite myExcel = new JavaExcelWrite();
    		myExcel.createExcel();
     
    	}*/
     
     
    }
    puis la classe que j'instacie afin de creer un Excel
    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
    package com.contact;
     
    import java.io.File;
    import java.io.IOException;
    import jxl.Workbook;
    import jxl.WorkbookSettings;
    import jxl.format.Alignment;
    import jxl.write.Label;
    import jxl.write.WritableCellFormat;
    import jxl.write.WritableFont;
    import jxl.write.WritableSheet;
    import jxl.write.WritableWorkbook;
    import jxl.write.WriteException;
    import jxl.write.biff.RowsExceededException;
    import android.os.Environment;
     
    public class Filewriter {
     
    public WritableWorkbook createWorkbook(String fileName){
        //exports must use a temp file while writing to avoid memory hogging
        WorkbookSettings wbSettings = new WorkbookSettings();
        wbSettings.setUseTemporaryFileDuringWrite(true);   
     
        //get the sdcard's directory
        File sdCard = Environment.getExternalStorageDirectory();
        //add on the  app's path
        File dir = new File(sdCard.getAbsolutePath() + "/JExcelApiTest");
        //make them in case they're not there
        dir.mkdirs();
        //create a standard java.io.File object for the Workbook to use
        File wbfile = new File(dir,fileName);
     
        WritableWorkbook wb = null;
     
        try{
        //create a new WritableWorkbook using the java.io.File and
        //WorkbookSettings from above
        wb = Workbook.createWorkbook(wbfile,wbSettings);
        }catch(IOException ex){
     
        }
     
        return wb;
    }
     
    /**
     *
     * @param wb - WritableWorkbook to create new sheet in
     * @param sheetName - name to be given to new sheet
     * @param sheetIndex - position in sheet tabs at bottom of workbook
     * @return - a new WritableSheet in given WritableWorkbook
     */
    public WritableSheet createSheet(WritableWorkbook wb,
        String sheetName, int sheetIndex){
        //create a new WritableSheet and return it
        return wb.createSheet(sheetName, sheetIndex);
    }
     
    /**
     *
     * @param columnPosition - column to place new cell in
     * @param rowPosition - row to place new cell in
     * @param contents - string value to place in cell
     * @param headerCell - whether to give this cell special formatting
     * @param sheet - WritableSheet to place cell in
     * @throws RowsExceededException - thrown if adding cell exceeds .xls row limit
     * @throws WriteException - Idunno, might be thrown
     */
    public void writeCell(int columnPosition, int rowPosition, String contents, boolean          headerCell,
        WritableSheet sheet) throws RowsExceededException, WriteException{
        //create a new cell with contents at position
        Label newCell = new Label(columnPosition,rowPosition,contents);
     
        if (headerCell){
            //give header cells size 10 Arial bolded
            WritableFont headerFont = new WritableFont(WritableFont.ARIAL, 10, WritableFont.BOLD);
            WritableCellFormat headerFormat = new WritableCellFormat(headerFont);
            //center align the cells' contents
            headerFormat.setAlignment(Alignment.CENTRE);
            newCell.setCellFormat(headerFormat);
        }
     
        sheet.addCell(newCell);
    }
    }
    De plus une petite question, le JRE des composant java sont inclut dans les librairie l'android?
    Merci l'ami

  5. #5
    Membre éclairé
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    508
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2008
    Messages : 508
    Par défaut Caused by: java.lang.NullPointerException
    Salut les amis j'ai un probleme de null pointeur exception, peut etre un objet non instancier, mais je ne trouve pas voici mes locCats
    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
    02-19 10:28:04.373: E/AndroidRuntime(340): FATAL EXCEPTION: main
    02-19 10:28:04.373: E/AndroidRuntime(340): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.contact/com.contact.MainActivity}: java.lang.NullPointerException
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at android.app.ActivityThread.access$1500(ActivityThread.java:117)
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at android.os.Handler.dispatchMessage(Handler.java:99)
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at android.os.Looper.loop(Looper.java:123)
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at android.app.ActivityThread.main(ActivityThread.java:3683)
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at java.lang.reflect.Method.invokeNative(Native Method)
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at java.lang.reflect.Method.invoke(Method.java:507)
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at dalvik.system.NativeStart.main(Native Method)
    02-19 10:28:04.373: E/AndroidRuntime(340): Caused by: java.lang.NullPointerException
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at com.contact.Filewriter.createSheet(Filewriter.java:58)
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at com.contact.MainActivity.onCreate(MainActivity.java:26)
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
    02-19 10:28:04.373: E/AndroidRuntime(340): 	... 11 more


    Voici ma class main entiere
    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
    package com.contact;
     
     
    import jxl.write.WritableSheet;
    import jxl.write.WritableWorkbook;
    import jxl.write.WriteException;
    import jxl.write.biff.RowsExceededException;
    import android.app.Activity;
    import android.os.Bundle;
    import android.view.Menu;
    import android.widget.Toast;
     
     
    public class MainActivity extends Activity {
     
    	WritableWorkbook wb;
    	WritableSheet ws;
     
    	@Override
    	protected void onCreate(Bundle savedInstanceState) {
    		super.onCreate(savedInstanceState);
    		setContentView(R.layout.activity_main);
     
    		 Filewriter f=new Filewriter();
    		    wb = f.createWorkbook("aa.xls");
    		    ws = f.createSheet(wb, "sheetName", 0);
    	    Toast.makeText(getApplicationContext(), "created", Toast.LENGTH_LONG).show();
    	        try{
    	                f.writeCell(1,1, "success", true, ws);
    	               }catch(RowsExceededException r){} catch(WriteException w){}
    	   }
     
     
    	@Override
    	public boolean onCreateOptionsMenu(Menu menu) {
    		// Inflate the menu; this adds items to the action bar if it is present.
    		getMenuInflater().inflate(R.menu.main, menu);
    		return true;
    	}
    	/*public void createExcel(){
    		JavaExcelWrite myExcel = new JavaExcelWrite();
    		myExcel.createExcel();
     
    	}*/
     
     
    }
    et ma classe que j'instancie afinc de creer mon excel et ca feuille
    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
    87
    package com.contact;
     
    import java.io.File;
    import java.io.IOException;
     
    import jxl.Workbook;
    import jxl.WorkbookSettings;
    import jxl.format.Alignment;
    import jxl.write.Label;
    import jxl.write.WritableCellFormat;
    import jxl.write.WritableFont;
    import jxl.write.WritableSheet;
    import jxl.write.WritableWorkbook;
    import jxl.write.WriteException;
    import jxl.write.biff.RowsExceededException;
    import android.os.Environment;
    import android.util.Log;
     
    public class Filewriter {
     
    public WritableWorkbook createWorkbook(String fileName){
        //exports must use a temp file while writing to avoid memory hogging
        WorkbookSettings wbSettings = new WorkbookSettings();
        wbSettings.setUseTemporaryFileDuringWrite(true);   
     
        //get the sdcard's directory
        File sdCard = Environment.getExternalStorageDirectory();
        //add on the  app's path
        File dir = new File(sdCard.getAbsolutePath() + "/JExcelApiTest");
        //make them in case they're not there
        dir.mkdirs();
        //create a standard java.io.File object for the Workbook to use
        File wbfile = new File(dir,fileName);
     
        WritableWorkbook wb = null;
     
        try{
        //create a new WritableWorkbook using the java.io.File and
        //WorkbookSettings from above
        wb = Workbook.createWorkbook(wbfile,wbSettings);
        }catch(IOException ex){
        	Log.e("dd",ex.getStackTrace().toString());
        }
     
        return wb;
    }
     
    /**
     *
     * @param wb - WritableWorkbook to create new sheet in
     * @param sheetName - name to be given to new sheet
     * @param sheetIndex - position in sheet tabs at bottom of workbook
     * @return - a new WritableSheet in given WritableWorkbook
     */
    public WritableSheet createSheet(WritableWorkbook wb,
        String sheetName, int sheetIndex){
        //create a new WritableSheet and return it
        return wb.createSheet(sheetName, sheetIndex);
    }
     
    /**
     *
     * @param columnPosition - column to place new cell in
     * @param rowPosition - row to place new cell in
     * @param contents - string value to place in cell
     * @param headerCell - whether to give this cell special formatting
     * @param sheet - WritableSheet to place cell in
     * @throws RowsExceededException - thrown if adding cell exceeds .xls row limit
     * @throws WriteException - Idunno, might be thrown
     */
    public void writeCell(int columnPosition, int rowPosition, String contents, boolean          headerCell,
        WritableSheet sheet) throws RowsExceededException, WriteException{
        //create a new cell with contents at position
        Label newCell = new Label(columnPosition,rowPosition,contents);
     
        if (headerCell){
            //give header cells size 10 Arial bolded
            WritableFont headerFont = new WritableFont(WritableFont.ARIAL, 10, WritableFont.BOLD);
            WritableCellFormat headerFormat = new WritableCellFormat(headerFont);
            //center align the cells' contents
            headerFormat.setAlignment(Alignment.CENTRE);
            newCell.setCellFormat(headerFormat);
        }
     
        sheet.addCell(newCell);
    }
    }
    De plus une petite question, le JRE des composant java sont inclut dans les librairie l'android?
    Merci l'ami

  6. #6
    Rédacteur
    Avatar de MrDuChnok
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Juin 2002
    Messages
    2 112
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 41
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Juin 2002
    Messages : 2 112
    Par défaut
    tu as cette erreur parce que ton "wb" (createWorkbook) retourne une valeur null, que tu utilises par la suite sans justement vérifier si ce premier est null.

    Par contre pourquoi ta méthode te renvoi null, là je sais pas, il faut y aller au débuguer et vérifier ce qu'il en est...
    - problèmes de droits d'écriture ?
    - chemin inexistant ?
    - autre ?

  7. #7
    Membre éclairé
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    508
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2008
    Messages : 508
    Par défaut
    merci l'amis j'avais néammoin trouvé avant tes conseil.

    Ils s'agissait bien des droit d'ecriture dans la carte sd, donc si pas de fichier creer, impossible de pouvoir creer unefeuille dedans dout le
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    02-19 10:28:04.373: E/AndroidRuntime(340): Caused by: java.lang.NullPointerException
    02-19 10:28:04.373: E/AndroidRuntime(340): 	at com.contact.Filewriter.createSheet(Filewriter.java:58)
    merci encore l'ami.
    Petite question au passage
    Je voudrais ecrire dans un excel des informations que l'utilisateur saisirais dans un editText, donc a chaque fois qu'un utilisateur lambda validerais mon formulaire(mes editText) une nouvelle ligne ce créerais dans mon excel, mais comment faire car pour l'instant je fait:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    Label label1 = new Label(0, 2, "SECOND");
    sheet.addCell(label1);
    mais la j'ai mis des positions ligne 2 colonne 0, alors comment faire pour aller la ligne sans préciser de position

    Merci

Discussions similaires

  1. Problème procedure stockée exécutée mensuellement
    Par PaulNero dans le forum Développement
    Réponses: 1
    Dernier message: 28/12/2012, 15h32
  2. Problème procedure stockée
    Par clouddd dans le forum ASP.NET
    Réponses: 2
    Dernier message: 08/12/2009, 17h35
  3. Problème procedure stocké avec odbc32.lib
    Par Seb33000 dans le forum Windows
    Réponses: 4
    Dernier message: 26/11/2008, 10h43
  4. Petit problème procedure
    Par braecking dans le forum Delphi
    Réponses: 2
    Dernier message: 28/02/2007, 12h01
  5. [PowerBuilder/Oracle] Problème de procedure stockée
    Par delphine_lep dans le forum Powerbuilder
    Réponses: 1
    Dernier message: 02/09/2004, 14h08

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