> > > > > I post here my code:
package com.sromku.simple.fb.example.fragments; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import uk.co.senab.actionbarpulltorefresh.library.ActionBarPullToRefresh; import uk.co.senab.actionbarpulltorefresh.library.PullToRefreshLayout; import uk.co.senab.actionbarpulltorefresh.library.listeners.OnRefreshListener; import com.example.hal.model.Offre; import com.example.hal.model.OffreController; import com.sromku.simple.fb.example.OffreAddActivity; import com.sromku.simple.fb.example.R; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.app.ListFragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; public class OffreFragment extends ListFragment implements OnRefreshListener{ private List<Offre> listsOffre = null; private List<String> listsName = null; private ArrayAdapter<String> offreArray; private PullToRefreshLayout mPullToRefreshLayout; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view =inflater.inflate(R.layout.fragment_offre, container, false); ViewGroup viewGroup = (ViewGroup) view; mPullToRefreshLayout = new PullToRefreshLayout(viewGroup.getContext()); ActionBarPullToRefresh.from(getActivity()) .insertLayoutInto(viewGroup) .theseChildrenArePullable(android.R.id.list, android.R.id.empty) .listener(this) .setup(mPullToRefreshLayout); return view; } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if(offreArray==null){ getAllOffre(); offreArray= new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, listsName); setListAdapter(offreArray); } } private void getAllOffre() { OffreController list = new OffreController(); if(listsName==null) listsName = new ArrayList<String>(); try { listsOffre = list.getAllOffre(); } catch (Exception e) { e.printStackTrace(); } if (listsOffre != null) { for (Object o : listsOffre) { Offre u=(Offre) o; if (u != null) listsName.add(u.getTitre() + "\n" + u.getTexte()); } } } private String[] getStringsOffre() { OffreController list = new OffreController(); int i=0; try { listsOffre = list.getAllOffre(); } catch (Exception e) { e.printStackTrace(); } String[] stringsName ={}; if (listsOffre != null) { stringsName = new String[listsOffre.size()]; for (Object o : listsOffre) { Offre u=(Offre) o; if (u != null) stringsName[i]=u.getTitre() + "\n" + u.getTexte(); i++; } } return stringsName; } final void newOffre(){ startActivity(new Intent(getActivity(), OffreAddActivity.class)); } @Override public void onRefreshStarted(View view) { new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... params) { getAllOffre(); return null; } @Override protected void onPostExecute(Void result) { super.onPostExecute(result); offreArray.notifyDataSetChanged(); mPullToRefreshLayout.setRefreshComplete(); } }.execute(); } } Le mardi 22 juillet 2014 14:18:49 UTC+2, Christophe DA COSTA a écrit : > > Thanks you for your answer. > > I checked all library, but, I have the same problem. > Strangely, this problem doesn't always appears And only to star the apply > > > > <https://lh3.googleusercontent.com/-P1VPPNR9cTs/U85VXz5p3zI/AAAAAAAAEzc/g6wsEYqKOoE/s1600/Sans+titre.png> > > > Le mercredi 9 juillet 2014 07:35:38 UTC+2, Vinny P a écrit : >> >> On Fri, Jun 27, 2014 at 2:49 PM, Christophe DA COSTA <toto...@gmail.com> >> wrote: >> >>> I use Webservices Rest on Android Apply, When I call a Webservice, often >>> I have an error: >>> 06-26 20:05:27.358: W/dalvikvm(8672): Exception Ljava/lang/ >>> NoClassDefFoundError; thrown while initializing >>> Lorg/codehaus/jackson/map/ext/JodaSerializers; >>> But in the AppEngine's Logs I haven't error: >>> >>> 2014-06-26 20:05:27.423 /rest/offre 200 219ms 1kb >>> >>> Can you help me? >>> >> >> >> This doesn't seem to be an App Engine problem. It looks like your Android >> application isn't able to find a library. If you're building your Android >> app in Eclipse, have you made sure that the Jackson libraries are being >> exported? Go to the Build Path section, and make sure the checkbox for >> exporting libraries is checked. >> >> >> ----------------- >> -Vinny P >> Technology & Media Consultant >> Chicago, IL >> >> App Engine Code Samples: http://www.learntogoogleit.com >> >> -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/d/optout.