Bishan
Bishan

Reputation: 15740

Issue in dropbox-android-sync-sdk-1.0

Below code in onClickLinkToDropbox() method in HelloDropboxActivity class of "Hello Dropbox" example in Android Sync SDK show error as

The type android.app.Fragment cannot be resolved. It is indirectly referenced from required .class files.

How can I solve this ? I'm using Android 2.3.3.

mDbxAcctMgr.startLink(this,REQUEST_LINK_TO_DBX);

Upvotes: 2

Views: 948

Answers (2)

Andrew
Andrew

Reputation: 1073

This seems to be the compiler being unreasonably picky during overload resolution. I see two possible solutions to this:

  1. Build with a later SDK version (11 or later). You only need to change the SDK you use to build (set the target in Eclipse project properties dialog, or target=android-11 in project.properties). You can leave both minimum and target set to 10 in your AndroidManifest.xml, so your app will still be compatible with older versions. In general it should always be safe to build with the latest SDK. You'll get warnings if you use APIs which don't exist in your manifest-defined target.

  2. Work around it by forcing the overload resolution like this: mDbxAcctMgr.startLink((Activity)this, REQUEST_LINK_TO_DBX);

Upvotes: 5

user1052016
user1052016

Reputation:

If you're not already using it, you will also need the Android Support library. In Eclipse, open the context menu on your project and select Android Tools → Add support library... and follow the prompts to add the library to your project.

https://www.dropbox.com/developers/sync/tutorial/android

Upvotes: 4

Related Questions