error: cannot access Task class file for bolts

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 03:23:45

问题


Im working through the tutorial given here and im stuck at the section of code posted below:

  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_list_users);
  }

  //display clickable a list of all users
  private void setConversationsList() {
      currentUserId = ParseUser.getCurrentUser().getObjectId();
      names = new ArrayList<String>();

      ParseQuery<ParseUser> query = ParseUser.getQuery();
      query.whereNotEqualTo("objectId", currentUserId);
      query.findInBackground(new FindCallback<ParseUser>() {
          public void done(List<ParseUser> userList, com.parse.ParseException e) {

it is failing on ParseQuery<ParseUser> query = ParseUser.getQuery();

with

Error:(53, 14) error: cannot access Task class file for bolts.Task not found

I'm having difficulty following this (knowing what files these code chunks go in) as im totally green at android dev.

Can someone tell me what is going wrong?


回答1:


Parse library depends on a library called Bolt which is in the same folder with the Parse library downloaded from the Parse.com website.

This is for Android Studio, but it should be similar for Eclipse.

Copy and past the Bolt library from the unzipped folder into the 'libs' folder of your project. You can also just copy and paste the entire unzipped library folder into the 'libs' folder. Right click on the 'Parse-.jar' file and select 'Add as library' or similar if it isn't already added. Do the same for the 'bolts-android-.jar' file. Try to run the project again and everything should work.



来源:https://stackoverflow.com/questions/29601421/error-cannot-access-task-class-file-for-bolts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!