Provide defaults for openjdk and the ANDROID_SDK_ROOT (follows
android studio defaults).
Details
- Reviewers
varun atul - Commits
- rCOMMd41253396fe3: [Nix] Add support for Android build on Darwin
On an intel or m1 mac:
Follow existing directions to download android sdk and ndk
nix develop cd native/android && ./gradlew bundleRelease --no-daemon
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
What's the reason for that? We can't move forward with Nix support if a core member of the team is unable to run Nix...
(Maybe we should track in a Linear task?)
Something is broken with the Nix Store partition and I'm scared to mess with it.
There's like a long list of uninstallation steps that I found and will try to go through. Hopefully uninstalling and re-installing should resolve things without breaking things any further. I'm going to do a full backup of my computer first in case something goes wrong (which it seems like it has for many people based on GitHub issues).
If uninstalling/reinstalling doesn't work, I'll write up a Linear issue. But figured I'd give that a shot first.
varuns-MacBook-Pro:android varun$ ./gradlew bundleRelease --no-daemon To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/6.9/userguide/gradle_daemon.html#sec:disabling_the_daemon. Daemon will be stopped at the end of the build (node:87685) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/varun/Code/comm/node_modules/tslib/package.json. Update this package.json to use a subpath pattern like "./*". (Use `node --trace-deprecation ...` to show where the warning was created) FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > com.android.builder.errors.EvalIssueException: SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/Users/varun/Code/comm/native/android/local.properties'. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 11s varuns-MacBook-Pro:android varun$ echo $ANDROID_SDK_ROOT /Users/varun/Library/Android/sdk
The test plan actually didn't work for me. The env var is set but the SDK still can't be located
What's the result of ls /Users/varun/Library/Android/sdk, you should have ~11 folders
What's the result of ls /Users/varun/Library/Android/sdk, you should have ~11 folders
That folder doesn't exist for me
/Users/varun/Library/Android/sdk/bin/sdkmanager --list (from the nix shell) should also show a lot of output
I haven't nix-ified the android sdk installation yet, so you would need to still follow https://github.com/CommE2E/comm/blob/master/docs/dev_environment.md#android-studio and the android sdk installation part.
I'll create a task
Created https://linear.app/comm/issue/ENG-1442 for dealing with sdk + ndk installation