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

Running _yarn start:android_ downloads wrong android version to compile with #16717

Closed
rancidfrog opened this issue Nov 7, 2017 · 2 comments
Closed
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@rancidfrog
Copy link

rancidfrog commented Nov 7, 2017

Is this a bug report?

Yes.

Environment

Environment:
OS: Linux 4.13
Node: 8.8.1
Yarn: 1.3.2
npm: 5.5.1
Watchman: Not Found

Target Platform: android

Steps to Reproduce

git clone https://github.com/gitpoint/git-point
cd to project, in my case git-point

  1. yarn
  2. yarn run link
  3. yarn start:android

Expected Behavior

App compiles. APK generated ...

Actual Behavior

I keep running into the following error,

:react-native-cookies:compileReleaseAidl FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-cookies:compileReleaseAidl'.
> java.lang.IllegalStateException: aidl is missing

I have no idea why running yarn start:androidon Arch Linux causes wrong buildToolsVersion to be used.
As it downloads 25.0.0 each time before using it against depending libraries mentioned above which state that they need 25.0.2

Incremental java compilation is an incubating feature.
Checking the license for package Android SDK Build-Tools 25 in /opt/android-sdk/licenses
License for package Android SDK Build-Tools 25 accepted.
Preparing "Install Android SDK Build-Tools 25".
> Configuring > 5/9 projects

One by one I got the same error for the following projects,

  • react-native-cookies
  • react-native-device-info
  • react-native-i18n

All had buildToolsVersion "25.0.2" which I changed to buildToolsVersion "23.0.1" in order to compile, as running yarn start android command kept downloading and using 25.0.0 even though gradle specifically asks for 25.0.2
Also, 25.0.2 is already downloaded, whereas 25.0.0 is not and it keeps redownloading it whe I delete it.

For some reason it is insisting on using 25.0.0:

Preparing "Install Android SDK Build-Tools 25".
"Install Android SDK Build-Tools 25" ready.
Finishing "Install Android SDK Build-Tools 25"
Installing Android SDK Build-Tools 25 in /opt/android-sdk/build-tools/25.0.0
"Install Android SDK Build-Tools 25" complete.

When in build.gradle of android app is buildToolsVersion "26.0.1"
And, build.gradle of react-native-cookies, react-native-device-info, react-native-i18n is buildToolsVersion "25.0.2"
So, why does it download 25.0.0 each time when neither point to it and both 26.0.1 and 25.0.2 are already installed?
I was able to compile app by changing the build.gradle of the following projects from buildToolsVersion "25.0.2" to buildToolsVersion "23.0.1"

  • react-native-cookies
  • react-native-device-info
  • react-native-i18n

But, why?

There might be a pull request to fix the problem, but since on Mar 9 it has not been merged.
#12820

Reproducible Demo

Building https://github.com/gitpoint/git-point causes build failure due to wrong android build sdk being used.
cd to project, in my case gitPoint

  1. yarn
  2. yarn run link
  3. yarn start:android

build.gradle of android app is buildToolsVersion "26.0.1"
And, build.gradle of react-native-cookies, react-native-device-info, react-native-i18n is buildToolsVersion "25.0.2"
So, why does it download 25.0.0 each time when neither point to it and both 26.0.1 and 25.0.2 are already installed?
I was able to compile app by changing the build.gradle of the following projects from buildToolsVersion "25.0.2" to buildToolsVersion "23.0.1"

  • react-native-cookies
  • react-native-device-info
  • react-native-i18n
@react-native-bot
Copy link
Collaborator

@facebook-github-bot no-template

@facebook-github-bot
Copy link
Contributor

Hey @rancidfrog, thanks for posting this! It looks like your issue is missing some required information. Can you please add all the details specified in the Issue Template? This is necessary for people to be able to understand and reproduce your issue. I am going to close this, but please feel free to open a new issue with the additional information provided. Thanks!

How to ContributeWhat to Expect from Maintainers

@facebook-github-bot facebook-github-bot added the Ran Commands One of our bots successfully processed a command. label Nov 7, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Nov 7, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Nov 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants