本文介绍了我是如何修复此错误的,因为我是开发移动应用程序的新手?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,这是我的java文件。我希望有人可以帮助我解决这个问题。我想做的是将DropboxAPI集成到我的应用程序中,我一直得到以下问题:



========================== Gradle Error ================= ===============================



错误:( 39,41)错误:找不到符号方法元数据(DropboxAPI,int,< null>,boolean,< null>)

错误:(40,56)错误:找不到符号变量内容

错误:(41,32)错误:找不到符号方法fileName()

错误:(53,34)错误:找不到符号方法obtainMessage()

错误:(57,16)错误:找不到符号方法sendMessage(消息)



=========== ================================================== =========================





- -------------------------------------我的java文件---------- --------------------------

package com.example.user.myapps;



导入android.os.AsyncTask;

导入android.os.Bundle;

导入android.os.DropBoxManager;

import android .os.Message;

导入android.os.DropBoxManager.Entry;





import com.dropbox .client2.DropboxAPI;

import com.dropbox.client2.exception.DropboxException;



import java.security.KeyStore;

import java.util.ArrayList;

import java.util.logging.Handler;



/ **

*由FaiqIkhwan于2016年4月13日创建。

* /

公共类ListFiles扩展AsyncTask< void,void,arraylist> {



private String dropboxApi;

私人DropboxAPI路径;

私人处理程序处理程序;



public ListFiles(Handler handler,DropboxAPI path,String dropboxApi){

this.handler = handler;

this.path =路径;

this.dropboxApi = dropboxApi;

}



@Override

protected ArrayList doInBackground(Void ... params){



ArrayList files = new ArrayList();



try {



条目目录= dropboxApi.metadata(path,1000,null,true,null);

for(DropBoxManager。条目入口:directory.contents){

files.add(entry.fileName());

}



} catch(DropboxException e){





}

返回文件;

} $ / $


@Override

protected void onPostExecute(ArrayList result){

消息消息= handler.obtainMessage( );

Bundle bundle = new Bundle();

bundle.putStringArrayList(data,result);

message.setData(bundle );

handler.sendMessage(消息);

}

}

------- -------------------------------------------------- -----------------------------



我是什么尝试过:



i搜索了问题并没有做任何事情。

Hi guys, this is my java file. I hope there is someone who can help me run out of this problem.What i'm trying to do is to integrate DropboxAPI into my apps and i'm keep getting the below problem:

==========================Gradle Error================================================

Error:(39, 41) error: cannot find symbol method metadata(DropboxAPI,int,<null>,boolean,<null>)
Error:(40, 56) error: cannot find symbol variable contents
Error:(41, 32) error: cannot find symbol method fileName()
Error:(53, 34) error: cannot find symbol method obtainMessage()
Error:(57, 16) error: cannot find symbol method sendMessage(Message)

======================================================================================


--------------------------------------my java file------------------------------------
package com.example.user.myapps;

import android.os.AsyncTask;
import android.os.Bundle;
import android.os.DropBoxManager;
import android.os.Message;
import android.os.DropBoxManager.Entry;


import com.dropbox.client2.DropboxAPI;
import com.dropbox.client2.exception.DropboxException;

import java.security.KeyStore;
import java.util.ArrayList;
import java.util.logging.Handler;

/**
* Created by FaiqIkhwan on 4/13/2016.
*/
public class ListFiles extends AsyncTask<void,void,arraylist> {

private String dropboxApi;
private DropboxAPI path;
private Handler handler;

public ListFiles(Handler handler, DropboxAPI path, String dropboxApi) {
this.handler = handler;
this.path = path;
this.dropboxApi = dropboxApi;
}

@Override
protected ArrayList doInBackground(Void... params) {

ArrayList files = new ArrayList();

try {

Entry directory = dropboxApi.metadata(path, 1000, null, true, null);
for (DropBoxManager.Entry entry : directory.contents){
files.add(entry.fileName());
}

}catch (DropboxException e){


}
return files;
}

@Override
protected void onPostExecute(ArrayList result) {
Message message = handler.obtainMessage();
Bundle bundle = new Bundle();
bundle.putStringArrayList("data",result);
message.setData(bundle);
handler.sendMessage(message);
}
}
--------------------------------------------------------------------------------------

What I have tried:

i had googled the problem and nothing is done.

推荐答案


这篇关于我是如何修复此错误的,因为我是开发移动应用程序的新手?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 05:59