简体   繁体   English

Dropbox SDK for android:找不到AndroidAuthSession

[英]Dropbox SDK for android: cannot find AndroidAuthSession

I am trying to integrate dropbox in my android project following the tutorial on the dropbox website. 我正在尝试按照Dropbox网站上的教程将dropbox集成到我的android项目中。 I referenced all the libraries that were in the sdk/libs path by "Add External JARs" into the preferences for my project. 我通过“添加外部JAR”将sdk / libs路径中的所有库引用到我的项目的首选项中。 But I get a 但我得到了一个

AndroidAuthSession cannot be resolved to a type AndroidAuthSession无法解析为某种类型

for this declaration 这个宣言

private DropboxAPI<AndroidAuthSession> mDBApi;

error and don't know why. 错误,不知道为什么。 These are my project imports done automatically with the cmd+shift+O command: 这些是使用cmd + shift + O命令自动完成的项目导入:

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

import com.dropbox.client2.DropboxAPI;
import com.dropbox.client2.session.Session.AccessType;

What am I missing? 我错过了什么?

EDIT: my libraries: 编辑:我的图书馆:
图书馆

我有点尴尬,但问题是dropbox-java库的错误导入而不是正确的dropbox-android库!

Since this is the top answer on Google, when searching for this issue, I will add what my problem with this was. 由于这是Google的最佳答案,因此在搜索此问题时,我会添加我的问题所在。 :) :)

You have to download the SDK from the top of the Dropbox tutorial page. 您必须从Dropbox教程页面的顶部下载SDK。 For example, the one I needed was here: https://www.dropbox.com/developers/core/sdks/android 例如,我需要的是: https//www.dropbox.com/developers/core/sdks/android

Just click the link where it says Download Android SDK -- it's a special bundle containing the dropbox libraries. 只需点击下载Android SDK的链接 - 它就是一个包含Dropbox库的特殊包。 The full instructions are at the bottom of the page. 完整说明位于页面底部。

There are several other pages like this one, containing different useful Dropbox libraries. 还有其他几个页面,包含不同的有用Dropbox库。

Hope this would be of help to someone! 希望这会对某人有所帮助!

"Since this is the top answer on Google" - no DB droid sdk in 2017. It's only java sdk and one - not enough - android example. “因为这是谷歌的最佳答案” - 2017年没有DB droid sdk。它只是java sdk和one - 还不够 - 安卓的例子。 Here. 这里。

ps learning DB auth somehow become challenging, tired of their messed up docs ps学习数据库认证不知何故变得具有挑战性,厌倦了他们混乱的文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM