title: Dropbox Sync API "Account not getting linked"
body: <p>I am following <a href="https://www.dropbox.com/developers/sync/start/android#linking-accounts" rel="nofollow">this Dropbox Tutorial</a> to start and setup my "Hello dropbox sync app".<br>
  In that am getting errors although i am going to steps given in the tutorial.<br>
  Permissions,App KEY,APP SECRET ,etc all are at their places still am not getting where i'm going wrong.
  please help me to get out of this. Thanks in advance</p>
  
  <p>here is my Manifest.xml :</p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.bguru.mydropboxdemo"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="16" /&gt;
  
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name="com.bguru.mydropboxdemo.MyDropboxDemoActivity"
          android:label="@string/app_name" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  
      &lt;activity android:name="com.dropbox.sync.android.DbxAuthActivity" /&gt;
  
      &lt;activity
          android:name="com.dropbox.client2.android.AuthActivity"
          android:launchMode="singleTask" &gt;
          &lt;intent-filter&gt;
              &lt;data android:scheme="db-MY_APP_KEY" /&gt;
  
              &lt;action android:name="android.intent.action.VIEW" /&gt;
  
              &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
              &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  
      &lt;service
          android:name="com.dropbox.sync.android.DbxSyncService"
          android:enabled="true"
          android:exported="false"
          android:label="Dropbox Sync" /&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <p>java code :</p>
  
  <pre><code>public class MyDropboxDemoActivity extends Activity implements OnClickListener
  {
      Button btnLinkToDropbox;
      DbxAccountManager dropBoxAcMngr;
      static final int REQUEST_LINK_TO_DROPBOX = 444;
      static final String APP_KEY = "MY_APP_KEY";
      static final String APP_SECRET = "MY_APP_SECRET";
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState)
  {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_my_dropbox_demo);
      dropBoxAcMngr = DbxAccountManager.getInstance(this, APP_KEY , APP_SECRET);
  
      btnLinkToDropbox = (Button) findViewById(R.id.btnLinkDropboxAC);
      btnLinkToDropbox.setOnClickListener(this);
  
  }
  
  @Override
  public void onClick(View v)
  {
      dropBoxAcMngr.startLink(getParent(), REQUEST_LINK_TO_DROPBOX);
  }
  
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data)
  {
      if(requestCode == REQUEST_LINK_TO_DROPBOX)
      {
          if(resultCode == Activity.RESULT_OK)
          {
              btnLinkToDropbox.setText("Successfully Linked To Your Dropbox Account");
              btnLinkToDropbox.setEnabled(false);
              Toast.makeText(this, "Account Linked", Toast.LENGTH_LONG).show();
          }
          else
          {
              btnLinkToDropbox.setText("Failed to Link Your Dropbox Account\nTry Again?");
              Toast.makeText(getApplicationContext(), "Account Linking failed", Toast.LENGTH_LONG).show();
          }
      }
      super.onActivityResult(requestCode, resultCode, data);
  }
  }
  </code></pre>
  
  <p>logcat shows :</p>
  
  <pre><code>    04-17 11:08:52.740: E/AndroidRuntime(4492): FATAL EXCEPTION: main
  04-17 11:08:52.740: E/AndroidRuntime(4492): java.lang.ExceptionInInitializerError
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at com.dropbox.sync.android.CoreAccountManager.initNativeLib(CoreAccountManager.java:109)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at com.dropbox.sync.android.CoreAccountManager.&lt;init&gt;(CoreAccountManager.java:89)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at com.dropbox.sync.android.DbxAccountManager.getInstance(DbxAccountManager.java:112)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at com.dropbox.sync.android.DbxAccountManager.getInstance(DbxAccountManager.java:99)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at com.bguru.mydropboxdemo.MyDropboxDemoActivity.onCreate(MyDropboxDemoActivity.java:27)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1662)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1726)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:949)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at android.os.Handler.dispatchMessage(Handler.java:99)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at android.os.Looper.loop(Looper.java:130)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at android.app.ActivityThread.main(ActivityThread.java:3770)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at java.lang.reflect.Method.invokeNative(Native Method)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at java.lang.reflect.Method.invoke(Method.java:507)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:638)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at dalvik.system.NativeStart.main(Native Method)
  04-17 11:08:52.740: E/AndroidRuntime(4492): Caused by: java.lang.ExceptionInInitializerError
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at com.dropbox.sync.android.NativeLib.&lt;init&gt;(NativeLib.java:33)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at com.dropbox.sync.android.NativeLib.&lt;clinit&gt;(NativeLib.java:11)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     ... 18 more
  04-17 11:08:52.740: E/AndroidRuntime(4492): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load DropboxSync: findLibrary returned null
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at java.lang.Runtime.loadLibrary(Runtime.java:429)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at java.lang.System.loadLibrary(System.java:554)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     at com.dropbox.sync.android.NativeHttp.&lt;clinit&gt;(NativeHttp.java:364)
  04-17 11:08:52.740: E/AndroidRuntime(4492):     ... 20 more
  </code></pre>