-
Notifications
You must be signed in to change notification settings - Fork 189
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
ANDROID_HOME and ANDROID_SDK environment variables are not set #502
Comments
I modified
It now works as expected (variables cannot be defined in terms of each other because dictionaries are not sorted). By the way, it seems that Android NDK has similar problems. |
Hi! Thanks for the contribution.
Could you make a PR with the change and run the tests?
As soon as I can I'll then test it and merge
…On 13 Dec 2017 20:33, "Tito Brasolin" ***@***.***> wrote:
I modified android.py like this:
class AndroidSDK(umake.frameworks.baseinstaller.BaseInstaller):
[...]
def post_install(self):
"""Add necessary environment variables"""
# add a few fall-back variables that might be used by some tools
# do not set ANDROID_SDK_HOME here as that is the path of the preference folder expected by the Android tools
# add "platform-tools" to PATH to ensure "adb" can be run once the platform tools are installed via
# the SDK manager
add_env_to_user(self.name, {"ANDROID_HOME": {"value": self.install_path, "keep": False},
"ANDROID_SDK": {"value": self.install_path, "keep": False},
"PATH": {"value": [os.path.join(self.install_path, "tools"),
os.path.join(self.install_path, "platform-tools")]}})
[...]
It now works as expected (variables cannot be defined in terms of each
other because dictionaries are not sorted).
By the way, it seems that Android NDK has similar problems.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#502 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGyLRch8McXVv6hAAazbwr0w0o2ZwDjYks5tACYLgaJpZM4RA05C>
.
|
Ok @LyzardKing Just give me a day or two (I'm quite busy on different tasks right now). |
Hi @LyzardKing Here it is: #503 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ubuntu: 14.04.5 LTS
umake: 17.03
In my opinion the problem is here:
https://github.com/Ubuntu/ubuntu-make/blob/master/umake/frameworks/android.py#L133
add_env_to_user should be called only once (with a dictionary of environment variables) because it removes framework envs from user at every execution.
The debug messages look fine:
Nevertheless, at the end only the PATH for Android SDK is written to .profile.
E.g. rust uses
add_env_to_user
correctly:https://github.com/Ubuntu/ubuntu-make/blob/master/umake/frameworks/rust.py#L80
The text was updated successfully, but these errors were encountered: