private Context mContext;
public Upload(Context context, DropboxAPI<?> api, String dropboxPath)
{
// We set the context this way so we don't accidentally leak activities
mContext = context.getApplicationContext();
String outPath = mContext.getExternalStorageDirectory(null).getAbsolutePath() + "/" +"a1.jpg";
错误:方法 getExternalStorageDirectory() 未为 Context 类型定义
String outPath = mContext.getExternalFilesDir("mnt/sdcard").getAbsolutePath() + "/" +"a1.jpg";
工作正常..