cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Android starter project

Former Member
0 Likes
195

Hi guys,

I'm wondering if somebody could provide me with a working sample android project built with android studio and the gradle build system.

Eclipse is no longer supported by the Google Android project, so doesn't make sense to head down that road.

I'm unable to get the samples provided with the SDK to work.  I suspect there are some intricacies involved with setting up the native jni libraries, but without knowing much about this process, it makes it pretty difficult to debug. I spent the best part of a day banging my head against a brick wall trying to figure it out, the sample project would build and deploy to my device,  but crash immediately, with no useful error information.

Any help would be appreciated!

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Likes

Hi All,

Just passing on some feeback from Adrian, who managed to resolve his issue here.
I would like to thank Adrian very much for providing detailed info regarding his solution to the problem.

I will quote directly where appropriate.

"Firstly, the problems I was having were not to do with JNI. Even though the Android Studio IDE gives 'cannot resolve' warnings about all the native methods in the Java files. I managed to get this to work by opening the sample project in Android Studio, using the default options to migrate from Eclipse. If one was to start a new project from scratch using Android Studio, however, they would need to put the .so files in a folder called jniLibs like so:" app/src/main/jniLibs/...

File Permissions: "The sample projects target quite an old android sdk version. Naturally, I don't have that version installed on my machine, so I changed this to match the version that my phone runs on (23). As it turns out, Google introduced some extra security features around app permissions in 23. Here's an article describing the changes:" https://developer.android.com/training/permissions/requesting.html#handle-response

"You have to enable permissions at run-time as well as at install time (through the manifest). Also, users can revoke permissions at any time, which if left un-handled would lead to our app throwing exceptions every time we try and load a scene."

Adrian also mentions an issue with files that include textures. We are investigating this and will write a post when we have some info.

Kind Regards

Mike