Wednesday, July 12, 2017

How to run bluestacks with Android Studio (seriously)

How to run or connect BlueStacks emulator with Android Studio:
1. DO NOT touch any file or adb or whatever in your android studio.
2. !important! Close Android Studio first or make sure that it is not running.
3. Open BlueStacks

  • Wait for the BlueStacks to load. You might see splash screens like this but do not touch anything.

  • For first time use you need to set-up the emulator by choosing a language and logging in to your Google account.

4. Open Android Studio
  • Wait for it to fully load and create/open your project.
  • Go to Run > Run App
  • Select the new emulator. It comes in many names! Mine is set as Samsung device. Just select it and click OK and wait for the project to compile.
  • Go to the BlueStacks window and click the app you created. The name of the app is the name of your Android App project.
I will upload screenshots shortly!

Friday, July 7, 2017

How to (really) resolve or fix Gradle project sync failed error in Android Studio

I've installed Android studio recently and got this frustrating gradle sync error. Clicking the Try Again link on the error message a million times did not help. I've tried different approaches from different blog posts including those that asked to install the Gradle manually but to no avail. I've thought, Android Studio should be intelligent and self-sustaining so let me try fixing it their way. 

So what I did was (or were *wink*)
*drum rroooollllssss*

1. I uninstalled Android Studio. Because f**k.
Kidding! I just wanted to restart and have a fresh version.

2. Installed Android Studio again because I needed it. Mobile Development, why not? I also opened the software via Run As Administrator. I don't know if it makes a difference but I did it anyway.

3. Waited for project to try gradle sync. But of course this will yield error again so proceed to next step.

4. Look at the error message and click the link(s) to install missing files or whatsoever. Look at the screenshot below:


I initially had 3 error messages there. I just clicked the links for installation, waited for Android studio to download and install them and waited yet again for the project to refresh.

!Important: You need to be connected to an internet connection. Your internet speed should be relatively faster. Believe me.