0

Before i've installed Android Studio, all projects were working fine. Now i have to run build with sudo to prevent the error.

I've tried different solutions, like this and this, but nothing helps. Android studio is uninstalled already, but error persists.

Community
  • 1
  • 1
stkvtflw
  • 12,092
  • 26
  • 78
  • 155
  • "Android studio is uninstalled already" -- Why did you uninstall? Anyways, the SDK is the problem, not Android Studio. Sounds like you need to install the specific version of the build tools mentioned in the gradle file – OneCricketeer Oct 03 '16 at 07:33
  • Because i do not use this... "tool". I needed it only to follow some instructions for Fabric. But, then i've found instructions for manual installation, so it was completely useless for me. I have the specific version. You do not need AS to install it. Just run `android` in your terminal and you will get the list of all packages and will be able to check/install/update/uninstall anyone of them – stkvtflw Oct 03 '16 at 07:36
  • i had this error before, also after AS installation. It was big headache. However, i do not remember how did i resolve it. – stkvtflw Oct 03 '16 at 07:38
  • Right, I know the `android` command will launch the SDK Manager. However, if you've removed Android Studio, you may have deleted the SDK Manager that it comes bundled with, and so now your `ANDROID_HOME` path variable could be pointed at the wrong spot – OneCricketeer Oct 03 '16 at 07:41
  • I haven't deleted SDK, checked – stkvtflw Oct 03 '16 at 07:42
  • If something would be wrong with sdk, i would not be able to run it with `sudo`. – stkvtflw Oct 03 '16 at 07:45
  • It's not really clear why you need `sudo` permissions, but you would be running the build as a different user, which has a different path variable, therefore the build tools likely cannot be found. – OneCricketeer Oct 03 '16 at 07:46
  • You are right, it faces another errors, because `~/.gradle` is not found, but it passes the stages, which could not be passed without `sudo` in my case. Apparently, something wrong with some configs. – stkvtflw Oct 03 '16 at 07:54

1 Answers1

0

I had to erase and reinstall whole SDK. Never ever install Android Studio, if you are not sure you do really need it.

stkvtflw
  • 12,092
  • 26
  • 78
  • 155
  • Glad you "fixed" it. I really think you just needed to update `ANDROID_HOME` path variable, though – OneCricketeer Oct 03 '16 at 08:41
  • I did, this doesn't help Maybe it's related to the fact, that i had sdk installed with `brew`, and AS installs own sdk in different location. So, everything break apart, i'm trying to install packges, but i'm installing them for wrong sdk etc... – stkvtflw Oct 03 '16 at 09:13
  • It was just a suggestion. For example, I have `android-sdk` with `brew` (and IntelliJ). And I have manually set `ANDROID_HOME`. – OneCricketeer Oct 03 '16 at 09:16