Example Android App
closed
E
Ethan Tran
I created a new Android app in Android Studio and followed the instructions for setting up the jniLibs. I get error "Unable to load library 'mongo_embedded_capi'". I updated gradle with sourceset jniLibs path and it tells me that functions cannot be found.
EDIT:
I found this. https://github.com/MongoCaleb/MongoDbMobile_Starter. I tried to see why his works and mine does not. Once I copied the gradle file to my project, it worked. It looks like the only difference is the versions. My project was 28 and his is 27. I also think this sdk could be improved with a simpler install process where there is no jniLibs that I have to mess with. Couchbase and realm don't require that. A couple lines in build.gradle files should be enough.
Drew DiPalma
closed
Cleaning up old items – This has been addressed.
Drew DiPalma
Hi Ethan – Thanks for the feedback! We're in the process of making packaging changes to MongoDB Mobile to avoid dealing with jniLibs and these should be live within the next month or so. We are also working on more polished mobile sample applications, so stay tuned for that as well. The version change from 28 to 27 shouldn't have made a difference, so we'll look into that as well.
E
Ethan Tran
Drew DiPalma: Never mind about the version change. 28 does work. I don't know what step I messed up on when making a new Android Studio project. I think I put the jniLibs folder in the wrong spot. But using his starter and changing to 28 works.
Drew DiPalma
Ethan Tran: Thanks for the confirmation on that Ethan!
Caleb Thompson
Ethan Tran - The original steps for copying the files to the jniLibs directory were not very clear about
which
files to copy, and I suspect that was the issue. I've updated them to be more clear.