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

Stop using gyp's android generator #87

mrdomino opened this Issue May 18, 2015 · 5 comments


None yet
5 participants
Copy link

mrdomino commented May 18, 2015

The gyp team removed support for the android format since a lot of people (present company included) mistook it for a way to build Android NDK libraries. It's apparently not meant to do that.

One of the proposed alternatives is to use gyp to generate ninja build files and to compile them using a toolchain generated with the NDK's I have a work-in-progress to do this at mrdomino/ninja-android-build. Still needed is to update the gradle config or otherwise cause ninja to be invoked on the library target, and probably to fix a few things here and there.


This comment has been minimized.

Copy link

j4cbo commented May 19, 2015

Yup, we're still figuring out what our plan is here; ninja is definitely a possibility. Also paging @skabbes


This comment has been minimized.

Copy link

skabbes commented May 19, 2015

My knee-jerk reaction is that what @mrdomino suggests is actually the right thing to do.


This comment has been minimized.

Copy link
Contributor Author

mrdomino commented May 20, 2015

It's almost certainly a right thing to do — I'm successfully using a minor variation on that in production on a project that uses both gyp and djinni. It's probably not the only right thing to do, but I haven't yet found anything better than that particular local optimum for that particular use case.


This comment has been minimized.

Copy link

syedhali commented Oct 15, 2015

Did you guys look into incorporating the ninja solution? The android example still doesn't build for me due to the same issue here:

ROID_BUILD_TOP= deps/gyp/gyp --depth=. -f android -DOS=android -Icommon.gypi example/libtextsort.gyp --root-target=libtextsort_jni
Traceback (most recent call last):
  File "deps/gyp/", line 18, in <module>
  File "/Library/Python/2.7/site-packages/gyp-0.1-py2.7.egg/gyp/", line 545, in script_main
    return main(sys.argv[1:])
  File "/Library/Python/2.7/site-packages/gyp-0.1-py2.7.egg/gyp/", line 538, in main
    return gyp_main(args)
  File "/Library/Python/2.7/site-packages/gyp-0.1-py2.7.egg/gyp/", line 514, in gyp_main
  File "/Library/Python/2.7/site-packages/gyp-0.1-py2.7.egg/gyp/", line 91, in Load
    generator = __import__(generator_name, globals(), locals(), generator_name)
ImportError: No module named android

This comment has been minimized.

Copy link

artwyman commented Oct 15, 2015

@syedhali you should be able to pull a specific old commit of gyp which still supports Android, which is what's done in the Djinni Makefile. Not a great solution, but we haven't put the time into a better one yet at Dropbox. Ninja may be good, but the NDK is what Google supports for ordinary developers to use on Android so we're a bit hesitant about going to another Chromium-specific solution. Android Studio is moving toward its own Gradle build using the NDK tools (but not the NDK makefiles), which may be the right target, but we haven't yet looked into adding a gyp generator for that, and I'm not confident that the Chromium team will make one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment