错误日志:
03-25 09:46:59.022: I/com.dropbox.sync.android.CoreAccountManager(2217): Prepared cache dir '/data/data/com.company.testapp/app_DropboxSyncCache/my-dropxbox-key'.
03-25 09:46:59.022: W/dalvikvm(2217): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/dropbox/sync/android/NativeHttp;
03-25 09:46:59.022: W/dalvikvm(2217): Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Lcom/dropbox/sync/android/NativeLib;
03-25 09:46:59.034: D/Updater(2217): java.lang.ExceptionInInitializerError
03-25 09:46:59.034: D/Updater(2217): at com.dropbox.sync.android.CoreAccountManager.initNativeLib(CoreAccountManager.java:107)
03-25 09:46:59.034: D/Updater(2217): at com.dropbox.sync.android.CoreAccountManager.<init>(CoreAccountManager.java:87)
03-25 09:46:59.034: D/Updater(2217): at com.dropbox.sync.android.DbxAccountManager.getInstance(DbxAccountManager.java:112)
03-25 09:46:59.034: D/Updater(2217): at com.dropbox.sync.android.DbxAccountManager.getInstance(DbxAccountManager.java:99)
03-25 09:46:59.034: D/Updater(2217): at com.company.testapp.ui.LoginActivity.notificationPosted(LoginActivity.java:1100)
03-25 09:46:59.034: D/Updater(2217): at com.company.testapp.io.NotificationCenter.postNotification(NotificationCenter.java:79)
03-25 09:46:59.034: D/Updater(2217): at com.company.testapp.io.Updater.processFinishedOperation(Updater.java:4044)
03-25 09:46:59.034: D/Updater(2217): at com.company.testapp.io.Updater.operationSuccess(Updater.java:3115)
03-25 09:46:59.034: D/Updater(2217): at com.company.testapp.io.Updater.access$5(Updater.java:3046)
03-25 09:46:59.034: D/Updater(2217): at com.company.testapp.io.Updater$1.run(Updater.java:2999)
03-25 09:46:59.034: D/Updater(2217): at android.os.Handler.handleCallback(Handler.java:615)
03-25 09:46:59.034: D/Updater(2217): at android.os.Handler.dispatchMessage(Handler.java:92)
03-25 09:46:59.034: D/Updater(2217): at android.os.Looper.loop(Looper.java:137)
03-25 09:46:59.034: D/Updater(2217): at android.app.ActivityThread.main(ActivityThread.java:4745)
03-25 09:46:59.034: D/Updater(2217): at java.lang.reflect.Method.invokeNative(Native Method)
03-25 09:46:59.034: D/Updater(2217): at java.lang.reflect.Method.invoke(Method.java:511)
03-25 09:46:59.034: D/Updater(2217): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
03-25 09:46:59.034: D/Updater(2217): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
03-25 09:46:59.034: D/Updater(2217): at dalvik.system.NativeStart.main(Native Method)
03-25 09:46:59.034: D/Updater(2217): Caused by: java.lang.ExceptionInInitializerError
03-25 09:46:59.034: D/Updater(2217): at com.dropbox.sync.android.NativeLib.<init>(NativeLib.java:33)
03-25 09:46:59.034: D/Updater(2217): at com.dropbox.sync.android.NativeLib.<clinit>(NativeLib.java:11)
03-25 09:46:59.034: D/Updater(2217): ... 19 more
03-25 09:46:59.034: D/Updater(2217): Caused by: java.lang.UnsatisfiedLinkError: Couldnt load DropboxSync: findLibrary returned null
03-25 09:46:59.034: D/Updater(2217): at java.lang.Runtime.loadLibrary(Runtime.java:365)
03-25 09:46:59.034: D/Updater(2217): at java.lang.System.loadLibrary(System.java:535)
03-25 09:46:59.034: D/Updater(2217): at com.dropbox.sync.android.NativeHttp.<clinit>(NativeHttp.java:364)
03-25 09:46:59.034: D/Updater(2217): ... 21 more
调用该函数:
DbxAccountManager mDbxAcctMgr = DbxAccountManager.getInstance(this.getApplicationContext(), Constants.DROPBOX_APP_KEY, Constants.DROPBOX_APP_SECRET); //error is here
toolbox.setmDbxAcctMgr(mDbxAcctMgr);
我在项目中获得了库v13,dropboxsync-sdk,以及清单上的所有权限和内容。有什么想法吗?
答案 0 :(得分:9)
我遇到了问题。我没有armeabi图书馆。将它添加到libs文件夹修复了我的问题。
从d3mon的回答:将.so添加到libs文件夹后:右键单击项目 - &gt;属性 - &gt; Java构建路径 - &gt; “库”标签 - &gt;展开“Android私人图书馆”并编辑“本地图书馆位置”。指向“libs”文件夹。
答案 1 :(得分:3)
将.so添加到libs文件夹后: 右键单击项目 - &gt;属性 - &gt; Java构建路径 - &gt; “库”标签 - &gt;展开“Android私人图书馆”并编辑“本地图书馆位置”。指向“libs”文件夹。