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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

android run build_pytorch_android.sh error #29799

Open
mathpopo opened this issue Nov 14, 2019 · 4 comments
Open

android run build_pytorch_android.sh error #29799

mathpopo opened this issue Nov 14, 2019 · 4 comments
Assignees
Labels
oncall: mobile Related to mobile support, including iOS and Android triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@mathpopo
Copy link

mathpopo commented Nov 14, 2019

馃悰 Bug

android build_pytorch_android.sh run error

To Reproduce

Steps to reproduce the behavior:

1.connect android phone
1.compiled the whole code
1.run android/run_test.sh

Expected behavior

Welcome to Gradle 5.0!

Here are the highlights of this release:

  • Kotlin DSL 1.0
  • Task timeouts
  • Dependency alignment aka BOM support
  • Interactive gradle init

For more details see https://docs.gradle.org/5.0/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

  • Where:
    Build file '/home/Downloads/pytorch/android/libs/fbjni_local/build.gradle' line: 40

  • What went wrong:
    A problem occurred evaluating project ':fbjni'.

Could not read script '/home/Downloads/pytorch/android/gradle/release.gradle' as it does not exist.

Environment

Please copy and paste the output from our
environment collection script
(or fill out the checklist below manually).

You can get the script and run it with:

wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py

Versions of relevant libraries:
[pip3] numpy==1.17.0
[conda] blas 1.0 mkl
[conda] magma-cuda101 2.5.1 1 pytorch
[conda] mkl 2019.4 243
[conda] mkl-include 2019.4 243
[conda] mkl-service 2.3.0 py37he904b0f_0
[conda] mkl_fft 1.0.15 py37ha843d7b_0
[conda] mkl_random 1.1.0 py37hd6b4f25_0
[conda] torch 1.4.0a0+104bb57 pypi_0 pypi

  • PyTorch Version (e.g., 1.4):
  • OS (e.g., Linux):
  • How you installed PyTorch (source in conda):
  • Build command you used (if compiling from source):
  • Python version:
  • CUDA/cuDNN version:10.1
  • GPU models and configuration:
  • Any other relevant information:

Additional context

@ailzhang ailzhang added oncall: mobile Related to mobile support, including iOS and Android triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Nov 14, 2019
@mathpopo
Copy link
Author

mathpopo commented Nov 15, 2019

./scripts/build_pytorch_android.sh also have same issue.

  • '[' false = true ']'
  • gradle -p /home/Downloads/pytorch/android clean assembleRelease

FAILURE: Build failed with an exception.

  • Where:
    Build file '/home/chenxin/Downloads/pytorch/android/libs/fbjni_local/build.gradle' line: 40

  • What went wrong:
    A problem occurred evaluating project ':fbjni'.

Could not read script '/home/Downloads/pytorch/android/gradle/release.gradle' as it does not exist.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

@IvanKobzarev IvanKobzarev self-assigned this Nov 15, 2019
@IvanKobzarev
Copy link
Contributor

@mathpopo
file android/gradle/release.gradle exists in the repo:
https://github.com/pytorch/pytorch/blob/master/android/gradle/release.gradle

I guess that something like android studio etc. could delete /gradle/ folder for 'cleaning' of the project

If that is the case - we can think about renaming /gradle/ folder

@mathpopo
Copy link
Author

mathpopo commented Nov 18, 2019

@IvanKobzarev as your path ,i copy the file manually.
Script '/home/Downloads/pytorch/android/gradle/release.gradle' line: 7

  • What went wrong:
    Could not compile script '/home/Downloads/pytorch/android/gradle/release.gradle'.

startup failed:
script '/home/Downloads/pytorch/android/gradle/release.gradle': 7: unexpected token: < @ line 7, column 1.

^

1 error

@fangichao
Copy link

fangichao commented Sep 26, 2021

when i run sh ./scripts/build_pytorch_android.sh, i got the following error:
"/scripts/build_pytorch_android.sh: 33: ./scripts/build_pytorch_android.sh: check_android_sdk: not found"
anyone know how to solve it?
JDK \NDK\Gradle\SDK all installed already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oncall: mobile Related to mobile support, including iOS and Android triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

4 participants