Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Androidstudio cmake build update #1925

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

nickblock
Copy link

Updated the androidStudio gradle projects and CMakeFiles.
This enables the sample projects to be built with the current androidStudio 3.0 tooling.
This enables native and java debugging capabilities of CInder projects using androidStudio on android devices.

fix android build
remove dynamic char being passed to variable args, avoiding "error: format string is not a string literal: -Wformat-security"
Updated cmake file for current AdnroidStudio (v2.2.3).

Removed color formatting from message outputs.
Replaced env vars for AndroidStudio convetions:
    NDK_ROOT -> ANDROID_NDK
Removed setting of LIBRARY_OUTPUT_PATH and CMAKE_ARCHIVE_OUTPUT_DIRECTORY
some more Android intermediate cruft
BasicApp sample converted to new androidStudio project
made use of asset.srcDir to add assets to project
multi touch basic updated
quicktime player on android working
rearranged java lib to get building
bestfit for android
rename FboBasic to match project name
rebuilt java libcuinder without  CameraV2 code path
updated all androidStudio projects
@richardeakin
Copy link
Collaborator

This is great, thanks so much before doing this! I also don't have any android devices to test at the moment, but hopefully we can get some other community members to try it out. Maybe an RFC on the forum makes sense? There are a handful of people there that have been making the android stuff work for their own needs.

@nickblock
Copy link
Author

Hmm, having trouble on windows with that. I've got a few more environments to test with now. Let me get another update to you shortly.

nickblock and others added 2 commits November 4, 2017 18:04
removed redundant cinder plugin dependancies
specified buildToolsVersion
use gradle 2.3.0, androidstudio will auto upgrade, if 3.0.0 is available
@nickblock
Copy link
Author

Right, quite confident about that now. Got AndroidStudio building and debugging on windows too with a few different devices.

@andrewfb
Copy link
Collaborator

andrewfb commented Nov 7, 2017

Thanks a lot for going after this. Work commitments will likely delay me 1-2 weeks but I can test this on Windows with an S8+ once I'm in front of the right computers again.

@PetrosKataras
Copy link
Contributor

I wanted to try this out on macOS 10.12.5 so I went ahead and installed Android Studio 3.0.1 and tried to import Cinder/proj/android/libcinder_java/build.gradle but the sync process fails with the following output:

screen shot 2018-02-07 at 5 53 42 pm

First attempt on Android so I m not familiar at all with the eco-system there and I might have missed something obvious though..

@PetrosKataras
Copy link
Contributor

Apparently this was the old gradle build file and the one that should be used is located under Cinder/src/cinder/java/build.gradle now. I also had to switch to gradle 3.3 by modifying gradle-wrapper.properties and changing distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip to distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
for successfully building BasicApp.

Cleaning Cinder/proj/android from old/obsolete stuff ( which occupy, currently, most of the space there ) would be a great next step probably. Also, I think that it would be nice if the build.gradle file could be located in this directory, as it used to, since this way the structure remains the same as in other platforms.. Not sure though what implications this might have..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants