Olá, gostaria de saber o que estou fazendo de errado, pois executo o app e ele sempre da um erro, dando um stop.
ListView listview;
List<ParseObject> ob;
ProgressDialog mProgressDialog;
ListViewAdapter adapter;
private List<WorldPopulation> worldpopulationlist = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
...
...
new RemoteDataTask().execute();
}
// RemoteDataTask AsyncTask
private class RemoteDataTask extends AsyncTask<Void, Void, Void> {
@Override
protected void onPreExecute() {
super.onPreExecute();
// Create a progressdialog
mProgressDialog = new ProgressDialog(Ofertas.this);
// Set progressdialog title
mProgressDialog.setTitle("Carregando Ofertas");
// Set progressdialog message
mProgressDialog.setMessage("Aguarde...");
mProgressDialog.setIndeterminate(false);
// Show progressdialog
mProgressDialog.show();
}
@Override
protected Void doInBackground(Void... params) {
// Create the array
worldpopulationlist = new ArrayList<WorldPopulation>();
try {
// Locate the class table named "Country" in Parse.com
ParseQuery<ParseObject> query = new ParseQuery<ParseObject>(
"Country");
// Locate the column named "ranknum" in Parse.com and order list
// by ascending
query.orderByAscending("ranknum");
ob = query.find();
for (ParseObject country : ob) {
// Locate images in flag column
ParseFile image = (ParseFile) country.get("flag");
WorldPopulation map = new WorldPopulation();
map.setRank((String) country.get("rank"));
map.setCountry((String) country.get("country"));
map.setPopulation((String) country.get("population"));
map.setFlag(image.getUrl());
worldpopulationlist.add(map);
}
} catch (ParseException e) {
Log.e("Error", e.getMessage());
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void result) {
// Locate the listview in listview_main.xml
listview = (ListView) findViewById(R.id.listView);
// Pass the results into ListViewAdapter.java
adapter = new ListViewAdapter(Ofertas.this,
worldpopulationlist);
// Binds the Adapter to the ListView
listview.setAdapter(adapter);
// Close the progressdialog
mProgressDialog.dismiss();
}
04-21 14:13:37.542 1997-2033/com.example.ronysueliton.patospizzas E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1 Process: com.example.ronysueliton.patospizzas, PID: 1997 java.lang.RuntimeException: An error occured while executing doInBackground() Caused by: java.lang.ClassNotFoundException: Didn't find class "bolts.Task" on path: DexPathList[[zip file "/data/app/com.example.ronysueliton.patospizzas-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] 04-21 14:13:40.692 1997-1997/com.example.ronysueliton.patospizzas E/WindowManager﹕ android.view.WindowLeaked: Activity com.example.ronysueliton.patospizzas.Ofertas has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{36780a24 V.E..... R.....ID 0,0-228,123} that was originally added here
ERRO APÓS APLICATIVO EXECUTADO:
04-21 14:13:28.689 1997-1997/com.example.ronysueliton.patospizzas E/libprocessgroup﹕ failed to make and chown /acct/uid_10063: Read-only file system 04-21 14:13:28.690 1997-1997/com.example.ronysueliton.patospizzas W/Zygote﹕ createProcessGroup failed, kernel missing CONFIG_CGROUP_CPUACCT? 04-21 14:13:28.691 1997-1997/com.example.ronysueliton.patospizzas I/art﹕ Not late-enabling -Xcheck:jni (already on) 04-21 14:13:29.459 1997-2009/com.example.ronysueliton.patospizzas I/art﹕ Background sticky concurrent mark sweep GC freed 1732(105KB) AllocSpace objects, 0(0B) LOS objects, 19% free, 501KB/623KB, paused 53.836ms total 224.661ms 04-21 14:13:30.092 1997-2009/com.example.ronysueliton.patospizzas I/art﹕ Background partial concurrent mark sweep GC freed 806(92KB) AllocSpace objects, 0(0B) LOS objects, 48% free, 547KB/1059KB, paused 67.873ms total 587.269ms 04-21 14:13:30.401 1997-1997/com.example.ronysueliton.patospizzas D/gralloc_goldfish﹕ Emulator without GPU emulation detected. 04-21 14:13:32.936 1997-2009/com.example.ronysueliton.patospizzas I/art﹕ Background sticky concurrent mark sweep GC freed 80(8KB) AllocSpace objects, 0(0B) LOS objects, 4% free, 1013KB/1059KB, paused 55.504ms total 207.889ms 04-21 14:13:32.955 1997-2009/com.example.ronysueliton.patospizzas I/art﹕ WaitForGcToComplete blocked for 12.850ms for cause Background 04-21 14:13:33.177 1997-2009/com.example.ronysueliton.patospizzas W/art﹕ Suspending all threads took: 31.058ms 04-21 14:13:33.267 1997-2009/com.example.ronysueliton.patospizzas I/art﹕ Background partial concurrent mark sweep GC freed 354(57KB) AllocSpace objects, 0(0B) LOS objects, 31% free, 1107KB/1619KB, paused 36.957ms total 252.492ms 04-21 14:13:33.571 1997-1997/com.example.ronysueliton.patospizzas I/Choreographer﹕ Skipped 54 frames! The application may be doing too much work on its main thread. 04-21 14:13:33.601 1997-2009/com.example.ronysueliton.patospizzas I/art﹕ WaitForGcToComplete blocked for 17.812ms for cause Background 04-21 14:13:33.809 1997-2009/com.example.ronysueliton.patospizzas W/art﹕ Suspending all threads took: 43.646ms 04-21 14:13:33.932 1997-1997/com.example.ronysueliton.patospizzas I/Choreographer﹕ Skipped 364 frames! The application may be doing too much work on its main thread. 04-21 14:13:34.046 1997-2033/com.example.ronysueliton.patospizzas W/art﹕ Verification of bolts.Task com.parse.ParseQuery.access$000(com.parse.ParseQuery, com.parse.ParseUser, boolean) took 493.573ms 04-21 14:13:34.136 1997-2009/com.example.ronysueliton.patospizzas I/art﹕ Background sticky concurrent mark sweep GC freed 2084(127KB) AllocSpace objects, 0(0B) LOS objects, 5% free, 1533KB/1619KB, paused 54.116ms total 495.521ms 04-21 14:13:34.544 1997-2033/com.example.ronysueliton.patospizzas W/art﹕ Verification of bolts.Task com.parse.ParseQuery.access$1900(com.parse.ParseQuery, com.parse.ParseUser) took 451.406ms 04-21 14:13:34.642 1997-2009/com.example.ronysueliton.patospizzas I/art﹕ Background sticky concurrent mark sweep GC freed 1771(149KB) AllocSpace objects, 0(0B) LOS objects, 11% free, 1430KB/1619KB, paused 38.067ms total 165.267ms 04-21 14:13:34.712 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:34.748 1997-2009/com.example.ronysueliton.patospizzas I/art﹕ WaitForGcToComplete blocked for 31.910ms for cause Background 04-21 14:13:34.925 1997-2009/com.example.ronysueliton.patospizzas I/art﹕ Background sticky concurrent mark sweep GC freed 438(40KB) AllocSpace objects, 0(0B) LOS objects, 9% free, 1463KB/1619KB, paused 37.214ms total 173.018ms 04-21 14:13:34.952 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:34.953 1997-2033/com.example.ronysueliton.patospizzas W/art﹕ Verification of bolts.Task com.parse.ParseQuery.countFromLocalDatastoreAsync(com.parse.ParseUser) took 270.375ms 04-21 14:13:34.981 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:34.981 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:35.182 1997-2033/com.example.ronysueliton.patospizzas W/art﹕ Verification of bolts.Task com.parse.ParseQuery.countFromNetworkAsync(com.parse.ParseUser, boolean) took 202.508ms 04-21 14:13:35.291 1997-2009/com.example.ronysueliton.patospizzas I/art﹕ Background sticky concurrent mark sweep GC freed 309(25KB) AllocSpace objects, 0(0B) LOS objects, 8% free, 1477KB/1619KB, paused 51.270ms total 272.787ms 04-21 14:13:35.329 1997-2033/com.example.ronysueliton.patospizzas W/art﹕ Verification of bolts.Task com.parse.ParseQuery.countWithCachePolicyAsync(com.parse.ParseQuery$CachePolicy, com.parse.ParseUser) took 146.497ms 04-21 14:13:35.541 1997-2033/com.example.ronysueliton.patospizzas W/art﹕ Verification of void com.parse.ParseQuery.doInBackground(com.parse.ParseQuery$CallableWithCachePolicy, com.parse.ParseCallback2) took 209.166ms 04-21 14:13:35.542 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:35.543 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:36.022 1997-1997/com.example.ronysueliton.patospizzas I/Choreographer﹕ Skipped 2068 frames! The application may be doing too much work on its main thread. 04-21 14:13:36.065 1997-2033/com.example.ronysueliton.patospizzas W/art﹕ Verification of bolts.Task com.parse.ParseQuery.doWithRunningCheck(java.util.concurrent.Callable) took 524.220ms 04-21 14:13:36.145 1997-2009/com.example.ronysueliton.patospizzas W/art﹕ Suspending all threads took: 73.184ms 04-21 14:13:36.160 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:36.161 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:36.162 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:36.208 1997-2009/com.example.ronysueliton.patospizzas I/art﹕ Background partial concurrent mark sweep GC freed 1102(96KB) AllocSpace objects, 0(0B) LOS objects, 24% free, 1563KB/2MB, paused 78.681ms total 690.493ms 04-21 14:13:36.288 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:36.289 1997-2033/com.example.ronysueliton.patospizzas W/art﹕ Verification of bolts.Task com.parse.ParseQuery.findFromNetworkAsync(com.parse.ParseUser, boolean) took 127.058ms 04-21 14:13:36.290 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:36.290 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:36.291 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:36.292 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:36.462 1997-2033/com.example.ronysueliton.patospizzas W/art﹕ Verification of bolts.Task com.parse.ParseQuery.getFromLocalDatastoreAsync(java.lang.String, com.parse.ParseUser) took 169.808ms 04-21 14:13:36.519 1997-1997/com.example.ronysueliton.patospizzas I/Choreographer﹕ Skipped 475 frames! The application may be doing too much work on its main thread. 04-21 14:13:36.632 1997-1997/com.example.ronysueliton.patospizzas I/Choreographer﹕ Skipped 111 frames! The application may be doing too much work on its main thread. 04-21 14:13:36.776 1997-1997/com.example.ronysueliton.patospizzas I/Choreographer﹕ Skipped 129 frames! The application may be doing too much work on its main thread. 04-21 14:13:36.847 1997-1997/com.example.ronysueliton.patospizzas I/Choreographer﹕ Skipped 71 frames! The application may be doing too much work on its main thread. 04-21 14:13:36.871 1997-2033/com.example.ronysueliton.patospizzas W/art﹕ Verification of com.parse.ParseQuery com.parse.ParseQuery.getQuery(java.lang.Class) took 407.817ms 04-21 14:13:36.908 1997-1997/com.example.ronysueliton.patospizzas I/Choreographer﹕ Skipped 45 frames! The application may be doing too much work on its main thread. 04-21 14:13:36.950 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:36.950 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:37.005 1997-1997/com.example.ronysueliton.patospizzas I/Choreographer﹕ Skipped 83 frames! The application may be doing too much work on its main thread. 04-21 14:13:37.048 1997-1997/com.example.ronysueliton.patospizzas I/Choreographer﹕ Skipped 33 frames! The application may be doing too much work on its main thread. 04-21 14:13:37.128 1997-1997/com.example.ronysueliton.patospizzas I/Choreographer﹕ Skipped 74 frames! The application may be doing too much work on its main thread. 04-21 14:13:37.211 1997-1997/com.example.ronysueliton.patospizzas I/Choreographer﹕ Skipped 72 frames! The application may be doing too much work on its main thread. 04-21 14:13:37.242 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:37.402 1997-1997/com.example.ronysueliton.patospizzas I/Choreographer﹕ Skipped 175 frames! The application may be doing too much work on its main thread. 04-21 14:13:37.410 1997-2033/com.example.ronysueliton.patospizzas I/art﹕ Rejecting re-init on previously-failed class java.lang.Class 04-21 14:13:37.411 1997-2033/com.example.ronysueliton.patospizzas W/art﹕ Verification of bolts.Task com.parse.ParseQuery$15.call() took 168.938ms 04-21 14:13:37.515 1997-1997/com.example.ronysueliton.patospizzas I/Choreographer﹕ Skipped 91 frames! The application may be doing too much work on its main thread. --------- beginning of crash 04-21 14:13:37.542 1997-2033/com.example.ronysueliton.patospizzas E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1 Process: com.example.ronysueliton.patospizzas, PID: 1997 java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:300) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) at java.util.concurrent.FutureTask.setException(FutureTask.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lbolts/Task; at com.parse.ParseQuery.checkIfRunning(ParseQuery.java:336) at com.parse.ParseQuery.doWithRunningCheck(ParseQuery.java:933) at com.parse.ParseQuery.findInBackground(ParseQuery.java:997) at com.parse.ParseQuery.find(ParseQuery.java:588) at com.example.ronysueliton.patospizzas.Ofertas$RemoteDataTask.doInBackground(Ofertas.java:101) at com.example.ronysueliton.patospizzas.Ofertas$RemoteDataTask.doInBackground(Ofertas.java:73) at android.os.AsyncTask$2.call(AsyncTask.java:288) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.ClassNotFoundException: Didn't find class "bolts.Task" on path: DexPathList[[zip file "/data/app/com.example.ronysueliton.patospizzas-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]