Ниже приведена часть кода Fragment-а. Абсолютно точно, ошибка в следующей строке:
mDbxAcctMgr = DbxAccountManager.getInstance(activity.getApplicationContext(), APP_KEY, APP_SECRET);
Android ошибку не выдаёт, но при вызове Fragment-а приложение вылетает. Подскажите, пожалуйста, почему, и как это исправить? APP_KEY и APP_SECRET - специальные ключи, которые я получил на официальном сайте. Они необходимы для использования DropBox в приложении.
public class MusicFragment extends Fragment {
Activity activity;
private DbxAccountManager mDbxAcctMgr;
private static final String APP_KEY = "u**************";
private static final String APP_SECRET = "q**************";
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof Activity){
activity=(Activity) context;
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
view = inflater.inflate(R.layout.activity_music, container, false);
mDbxAcctMgr = DbxAccountManager.getInstance(activity.getApplicationContext(), APP_KEY, APP_SECRET);
return view;
}
}
Вот, что пишут логи:Process: com.mopchik.mopchik, PID: 26357
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.mopchik.mopchik-2/base.apk"],nativeLibraryDirectories=[/data/app/com.mopchik.mopchik-2/lib/arm64, /system/lib64, /vendor/lib64]]] couldn't find "libDropboxSync.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:984)
at java.lang.System.loadLibrary(System.java:1562)
at com.dropbox.sync.android.NativeHttp.<clinit>(NativeHttp.java:364)
at com.dropbox.sync.android.NativeLib.<init>(NativeLib.java:33)
at com.dropbox.sync.android.NativeLib.<clinit>(NativeLib.java:11)
at com.dropbox.sync.android.NativeLib.getInstance(NativeLib.java:26)
at com.dropbox.sync.android.CoreAccountManager.initNativeLib(CoreAccountManager.java:109)
at com.dropbox.sync.android.CoreAccountManager.<init>(CoreAccountManager.java:89)
at com.dropbox.sync.android.DbxAccountManager.getInstance(DbxAccountManager.java:112)
at com.dropbox.sync.android.DbxAccountManager.getInstance(DbxAccountManager.java:99)
at com.mopchik.mopchik.MusicFragment.onCreateView(MusicFragment.java:61)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:2346)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1428)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1759)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1827)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:797)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2596)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2383)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2338)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2245)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:703)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6195)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)