Error loading listview of parse.com

Asked

Viewed 200 times

2

Hi, I’d like to know what I’m doing wrong, because I run the app and it always gives an error, giving a 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.Offers has leaked window com.android.Internal.policy.impl.Phonewindow$Decorview{36780a24 V.E..... R..... ID 0,0-228,123} that was Originally Added here

ERROR AFTER APPLICATION EXECUTED:

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) Allopace csObjects, 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) Allopace csObjects, 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 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) Allopace csObjects, 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 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 java.lang.Class 04-21 14:13:34.981 1997-2033/com.example.ronysueliton.patospizzas I/art Rejecting re-init on Previously-failed 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) Allopace csObjects, 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 java.lang.Class 04-21 14:13:35.543 1997-2033/com.example.ronysueliton.patospizzas I/art Rejecting re-init on]]

2 answers

1


By mistake Didn't find class "bolts.Task" is saying that the class does not exist (did not find the class "bolts.Task"), it is likely that the package referring to the class was not added to the application, for that just add the package bolts-android

There is a link called "Artifacts: Maven Central" below each Release, in it you find the version jar.

If you are using the Parse.com, you can follow this link: https://parse.com/apps/quickstart#parse_data/mobile/android/Native/existing

Installing the SDK

  • Download and extract the SDK: https://parse.com/downloads/android/Parse/latest
  • Be sure to be using Gingerbread (android-9) or higher.
  • Add the SDK to your app from Android Studio:

    Drag the Parse-*.jar that you downloaded to your app in the "libs" folder and add to your build.gradle this:

    dependencies {
        compile 'com.parse.bolts:bolts-android:1.+'
        compile fileTree(dir: 'libs', include: 'Parse-*.jar')
    }
    

To the problem failed to make and chown /acct/uid_10063: Read-only file system

This error probably occurs because your virtual android is in read mode, or does not have a virtualized memory card (Sdcard), to resolve do this:

  • Go to the woman .android virtual machines and search for the file config.ini, for example ~/.android/avd/adv1.avd/config.ini or on Windows C:\Users\cr\.android\avd\adv1.avd\config.ini

  • Open the file with a text editor like Notepad++ or Sublimetext

  • Change this line hw.sdCard=no for hw.sdCard=yes

  • Save the file and restarted Androidstudio or Eclipse

  • Open again and try to run your project

1

Thank you Guilherme Nascimento for the tips, I am new here and I just wanted to show how I had found the solution. Well, I found that it was necessary to add the name of Class Parseapplication inside Android Manifest.

<application
    android:name="ParseApplication"
    ....
  • My vote limit exceeded today, but once back will be +1, thanks for collaborating friend :)

  • I thank you man. Thanks for the tips, very show.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.