Bonjour, J'ai une erreur que j'arrive pas à résoudre, ça fait plus de 3 jours que je travail dessus. Ci-dessous le contenu log.
06-30 17:42:23.110: D/dalvikvm(1058): GC_FOR_ALLOC freed 104K, 7% free 3107K/3316K, paused 180ms, total 184ms
06-30 17:42:23.190: I/Choreographer(1058): Skipped 50 frames!  The application may be doing too much work on its main thread.
06-30 17:42:23.880: I/Choreographer(1058): Skipped 40 frames!  The application may be doing too much work on its main thread.
06-30 17:42:24.180: D/gralloc_goldfish(1058): Emulator without GPU emulation detected.
06-30 17:42:37.400: I/Choreographer(1058): Skipped 91 frames!  The application may be doing too much work on its main thread.
06-30 17:42:39.330: D/dalvikvm(1058): GC_FOR_ALLOC freed 112K, 6% free 3496K/3716K, paused 107ms, total 115ms
06-30 17:42:39.960: I/Choreographer(1058): Skipped 1625 frames!  The application may be doing too much work on its main thread.
06-30 17:42:40.500: I/Choreographer(1058): Skipped 144 frames!  The application may be doing too much work on its main thread.
06-30 17:42:40.960: I/Choreographer(1058): Skipped 40 frames!  The application may be doing too much work on its main thread.
06-30 17:42:45.170: I/INFO(1058): POSITION:1
06-30 17:42:45.460: I/Choreographer(1058): Skipped 200 frames!  The application may be doing too much work on its main thread.
06-30 17:42:52.000: D/dalvikvm(1058): GC_FOR_ALLOC freed 37K, 4% free 3943K/4088K, paused 108ms, total 127ms
06-30 17:42:52.280: I/Choreographer(1058): Skipped 36 frames!  The application may be doing too much work on its main thread.
06-30 17:42:52.400: W/Resources(1058): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f05003f}
06-30 17:42:52.420: D/item(1058): id itemcom.bokk.cuisineafrique.Categorie@b2dc3f58
06-30 17:42:52.420: D/titre(1058): titre itemApéritifs
06-30 17:42:52.430: D/AndroidRuntime(1058): Shutting down VM
06-30 17:42:52.430: W/dalvikvm(1058): threadid=1: thread exiting with uncaught exception (group=0xb2a1cba8)
06-30 17:42:52.510: E/AndroidRuntime(1058): FATAL EXCEPTION: main
06-30 17:42:52.510: E/AndroidRuntime(1058): Process: com.bokk.cuisineafrique, PID: 1058
06-30 17:42:52.510: E/AndroidRuntime(1058): java.lang.NullPointerException
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at com.bokk.cuisineafrique.CategorieAdapter.getView(CategorieAdapter.java:78)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.widget.AbsListView.obtainView(AbsListView.java:2263)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.widget.GridView.onMeasure(GridView.java:1044)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.View.measure(View.java:16497)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.View.measure(View.java:16497)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at com.android.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:327)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.View.measure(View.java:16497)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
06-30 17:42:52.510: E;/AndroidRuntime(1058): 	at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2291)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.View.measure(View.java:16497)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1916)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1113)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1295)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5670)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.Choreographer.doCallbacks(Choreographer.java:574)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.Choreographer.doFrame(Choreographer.java:544)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.os.Handler.handleCallback(Handler.java:733)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.os.Handler.dispatchMessage(Handler.java:95)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.os.Looper.loop(Looper.java:136)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at android.app.ActivityThread.main(ActivityThread.java:5017)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at java.lang.reflect.Method.invokeNative(Native Method)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at java.lang.reflect.Method.invoke(Method.java:515)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
06-30 17:42:52.510: E/AndroidRuntime(1058): 	at dalvik.system.NativeStart.main(Native Method)
06-30 17:42:59.150: I/Process(1058): Sending signal. PID: 1058 SIG: 9
06-30 17:43:05.100: I/Choreographer(1121): Skipped 43 frames!  The application may be doing too much work on its main thread.
06-30 17:43:05.980: D/dalvikvm(1121): GC_FOR_ALLOC freed 82K, 6% free 3129K/3316K, paused 166ms, total 173ms
06-30 17:43:06.140: I/Choreographer(1121): Skipped 318 frames!  The application may be doing too much work on its main thread.
06-30 17:43:06.360: D/gralloc_goldfish(1121): Emulator without GPU emulation detected.
le fichier java 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package com.bokk.cuisineafrique;
 
import java.util.ArrayList;
 
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
 
public class CategorieAdapter extends BaseAdapter{
 
 
	Context context;
	ArrayList<Categorie> listCategorie = new ArrayList<Categorie>(); 
	LayoutInflater layoutInflater;
 
	public CategorieAdapter(Context context, ArrayList<Categorie> listCategorie) {
		this.listCategorie = listCategorie;
		layoutInflater = LayoutInflater.from(context);
	}
 
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return listCategorie.size();
	}
 
	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return listCategorie.get(arg0);
	}
 
	@Override
	public long getItemId(int arg0) {
		// TODO Auto-generated method stub
		return arg0;
	}
 
 
 
 
	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2) {
		// TODO Auto-generated method stub
		ViewHolder holder;
 
		if (arg1==null)
		{
 
			arg1= layoutInflater.inflate(R.layout.affichage_categorie, null);
			holder = new ViewHolder();
 
		// imageCategorieView correspondant à la textView associé a l'image
		holder.imageCategorieView = (ImageView) arg1.findViewById(R.id.imageCategorie);
		// titreCategorieView correspondant à la textView associé a la categorie
		holder.titreCategorieView = (TextView) arg1.findViewById(R.id.titreCategorie);
		//tagguer notre objet pour pouvoir le récupérer à la prochaine mise à jour graphique.
		arg1.setTag(holder);
		}
		else
		{
		holder = (ViewHolder) arg1.getTag();
		}
		// mettre les données dans chaque composante associée
 
		Categorie item = listCategorie.get(arg0);
 
		if (item != null){
 
			Log.d("item", "id item"+item);
			Log.d("titre", "titre item"+item.getTitreCategorie());
			holder.imageCategorieView.setImageDrawable(item.getImageCategorie());
			holder.titreCategorieView.setText(item.getTitreCategorie());
 
		}
 
 
		return arg1;
 
 
	}
 
	static class ViewHolder { 
 
		ImageView imageCategorieView;
		TextView titreCategorieView;
		}
 
}