-
Notifications
You must be signed in to change notification settings - Fork 262
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
[BUG] If there are spaces in ANDROID_SDK_ROOT, ndk-build will not work. #1400
Comments
I doubt this is something that will ever work reliably, FYI. This is extremely difficult to do correctly in a make based system, especially one like ours which makes heavy use of We should probably emit a warning if the NDK is installed to such a path. We already do that when the source is in a path that contains spaces, but we don't check the NDK itself I guess. We should also squash this particular case, but I suspect we'll regress. |
Apparently this is already forbidden: https://android.googlesource.com/platform/ndk/+/refs/heads/master/build/ndk-build#53 and https://android.googlesource.com/platform/ndk/+/refs/heads/master/build/core/build-local.mk#43. The former of course isn't used on Windows, but the latter doesn't appear to work there either. Your GHA log has unfortunately been culled, so I have no idea what the original report was, but this does seem quite broken on Windows. |
Adding this seems to be the way to catch the problem (will upload a patch in a moment): for /f "tokens=2" %%a in ("%~dp0") do (
echo ERROR: NDK path cannot contain spaces
exit /b 1
) |
Thanks! I tried the same thing you did (quote the thing in ndk-build.cmd) and ran into the same problem (that's insufficient). The fix you ended up merging makes sense to me.
make can't catch the second case on windows. |
This, in case it wasn't clear, is a pretty big blocker for us ever doing better at this. Still probably less problematic than |
Description
If there are spaces in
ANDROID_SDK_ROOT
,ndk-build
will not work.test case: GitHub Actions
windows-latest
OSlog: https://github.com/vvb2060/XposedDetector/runs/1550701901?check_suite_focus=true#step:5:62
Environment Details
21.3.6528147
and22.0.6917172-beta1
ndk-build
command and gradleThe text was updated successfully, but these errors were encountered: