[Android-development] Integrating Dropbox

Harri Pasanen harri at mpaja.com
Thu Sep 25 16:06:48 CEST 2014


On 25/09/2014 15:20, Stromme Christian wrote:
> On 25 Sep 2014, at 08:48 , Harri Pasanen <harri at mpaja.com> wrote:
>
>> On 24/09/2014 19:57, Harri Pasanen wrote:
>>> Hi,
>>>
>>> Trying to include official DropBox Android SDK libs in my Qt project,
>>> I ran into an issue where the app crashes at startup.
>>>
>>> Logcat provides a hint:
>>>
>>> W/dalvikvm(22608): No implementation found for native
>>> Lcom/dropbox/sync/android/NativeLib;.nativeLibIsLoaded:()Z
>>>
>>> shortly after uncaught exceptions cause it to crash and come burning
>>> down.
>>>
>>> I think what is happening is that the DropBox java API is trying to
>>> reload the libDropboxSync.so which is already loaded by Qt as it is
>>> part of the
>>> bundled_libs in libs.xml.  It is not prepared for the fact that the
>>> lib is already loaded.
>>>
>>> Is there some qmake magic or other voodoo that would bundle a lib in
>>> APK's library folder, but would prevent Qt from loading it?
>>>
>>> Like a variable that would blacklist the libraries not to be loaded by
>>> Qt at startup?
>>>
>>> Thanks,
>>>
>>> Harri
>> Curiosity got the better of me and I went rummaging around the Qt source.
>>
>> I hope to be wrong, but I don't think my case above has been thought of
>> yet.  Seems like one possible place to hack would be around
>> the function public static void loadBundledLibraries() in QtNative.java.
>> Better solution would be to have a a second category of bundled libs:
>> bundled yes, but not so much as automatically loaded.
>>
>> Any hints appreciated,
>>
>> Harri
>>
>>
>>
>> _______________________________________________
>> Android-development mailing list
>> Android-development at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/android-development
>
> Hi,
>
> I don’t know how the DropBox implementation is done, but I would be very surprised if it fails due
> to a library reload… Can you confirm that the appropriate dropbox libraries are loaded by Qt?
> Also, Qt only loads libraries you tell it to load (see ANDROID_EXTRA_LIBS in your .pro file)
>
>> Christian
>

Dropbox Sync SDK for Android has a java part, and a native .so that is 
loaded by the former, not unlike Qt on Android.

I'm in the process of recompiling Qt with my tweak to see if that really 
is the issue, or if I'm pursuing a red herring.

I have libDropboxSync.so in ANDROID_EXTRA_LIBS, as there does not appear 
to be another way to get it to be part of the package, is there?
I'll post my findings once I've got Qt compiled.



Harri











More information about the Android-development mailing list