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

Setup instructions don't make sense to me #55

Closed
ColtonIdle opened this issue Nov 12, 2020 · 7 comments
Closed

Setup instructions don't make sense to me #55

ColtonIdle opened this issue Nov 12, 2020 · 7 comments

Comments

@ColtonIdle
Copy link

Hello! I want to give this project a shot. I have two machine in my home. One imac pro in my office, and another macbook that I use to code in other rooms.

I want my imac pro to do the heavy lifting so it looks like I would follow the "Setup remote machine" steps?

My macbook would follow the "Setup local machine" steps?

Can someone confirm that that's right?

Then another issue that doesn't make sense is this step. "Put this into USER_HOME/.gradle/init.d/mirakle_init.gradle" Is this for my local or my remote?

@skrugly
Copy link
Owner

skrugly commented Nov 12, 2020

Hey, yes your macbook should follow local steps and mirakle_init.gradle should be put on it. And imac pro should follow remote machine steps.
In short you have to make access from local to remote machine through ssh, and install\update rsync on both machines.
Run brew install rsync on both machines and then check the version rsync --version. Rsync 3.2.3 is the latest version available, but 3.1.3+ should be fine.
I agree the documentation requires a fresh look and improvement.
Feel free to ask in case it remains unclear.

@ColtonIdle
Copy link
Author

Thanks for clarifying. I had trouble setting up the ssh keys (im trying to do this on two machines that already have ssh keys) and so I didn't want to generate new ones and invalidate the ones that I use for github, but I changed the configuration file to just have the the auth method set to keyboard-interactive and I just type in the password for the remote machine.

That seemed to work!

Now I'm fighting an issue where it says > 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/coltonidle/Projects/rollertoaster/local.properties'.

Any chance what to do here? I have an ANDROID_HOME set on both machines as I use both of them to do android development.

@skrugly
Copy link
Owner

skrugly commented Nov 13, 2020

Open /etc/profile on remote machine and add ANDROID_HOME and ANDROID_SDK_ROOT variables.
You may do it through ssh or open that file directly on iMac.

> ssh remote_machine
> sudo nano /etc/profile

and add this lines to the end:

# Android SDK
export ANDROID_HOME=%Your path to android sdk%
export ANDROID_SDK_ROOT=%Your path to android sdk%
export PATH=$PATH:$ANDROID_HOME/tools/bin

Very likely the path on MacOs will have look ~/Library/Android/sdk.

Press ctrl + o + enter to save
Press ctrl + x to exit
Close the ssh session
> exit

Next time you login to remote machine you should have that variables available and build should start to work

> ssh remote_machine
> echo $ANDROID_SDK_ROOT
~/Library/Android/sdk
> ./gradle assemble

@ColtonIdle
Copy link
Author

@Adambl4 I appreciate the response. Before following your instructions above, I ssh'd from laptop into the imac, and then did echo $ANDROID_HOME and $ANDROID_SDK_ROOT and everything came up correctly! This is weird though because I still have that same error message that I mentioned yesterday.

I followed your advice of editing /etc/profile on my imac and I added those line to the end of the file but I still have the same issue. At this point it seems to not be an issue with mirakle but would appreciate if you have any other ideas to debug this.

@ColtonIdle
Copy link
Author

Hm. Yeah, I've double and triple checked to make sure that my imac (remote machine) has ANDROID_SDK_ROOT set. I did so by verifying locally, and by ssh'ing into the machine. It really seems like something else is wrong. I noticed that others had the same issue and they resolved by creation a local.properties file on the remote machine. #35 I'm assuming this is a bug in mirakle? It seems really suspicious that a few people had the same exact issue here.

Still doing some testing, but it looks like creating local.properties does the trick. Now I just have to test if hitting the run button will execute on remote, but install on a local emulator. Fingers crossed!

@ColtonIdle
Copy link
Author

Holy crap! I think it worked. Hit the run button on local Android Studio. Remote imac spins up and I can hear the fans blasting. A few seconds later my app starts running on my local emulator. I made a string change, and hit "apply changes", a few seconds go by and bam my change is on my local emulator.

ALl this and my laptop didn't burst into flames when building like it usually does. Holy crap this is so aweomse. Am I missing anything? This seems too good to be true. where has this been all my life.

@skrugly
Copy link
Owner

skrugly commented Nov 18, 2020

I glad you managed to get the thing to work. Enjoy the using.
I will make an effort to improve instructions.

@skrugly skrugly closed this as completed Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants