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

I encountered an error when I tried to build Android development #8619

Open
an1217 opened this issue May 16, 2023 · 6 comments
Open

I encountered an error when I tried to build Android development #8619

an1217 opened this issue May 16, 2023 · 6 comments
Labels
C-Bug An unexpected or incorrect behavior O-Android Specific to the Android mobile operating system

Comments

@an1217
Copy link

an1217 commented May 16, 2023

thread 'main' panicked at 'Failed to read source.properties: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/anmingle/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/ndk-build-0.9.0/src/ndk.rs:89:14
Here is my running environment:
Android Debug Bridge version 1.0.41
Version 28.0.2-debian
Installed as /usr/lib/android-sdk/platform-tools/adb
NDK:--version 21.4.7075529
The system is ubuntu

@an1217 an1217 added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels May 16, 2023
@mockersf
Copy link
Member

Is this when building or when running? Could you share the commands you executed? Could you share code to reproduce the issue?

@mockersf mockersf added O-Android Specific to the Android mobile operating system and removed S-Needs-Triage This issue needs to be labelled labels May 16, 2023
@an1217
Copy link
Author

an1217 commented May 18, 2023

Running, I follow the tutorial on the official website and
[Download command]
sudo apt install android-sdk android-tools-adb android-tools-fastboot
[environment variable]
export ANDROID_SDK_ROOT=/home/anmingle/Android/Sdk
export ANDROID_NDK_ROOT=/home/anmingle/Android/Sdk/21.4.7075529

Sorry for the following error when I tried to retry:
Android SDK has no platforms installed.
I've been trying for a long time

@an1217
Copy link
Author

an1217 commented May 21, 2023

The ndk version 25.2.9519653 sdk version 31 I used cannot run. Is there any documentation for the version I can use

@mockersf
Copy link
Member

Works for me with both ndk 25.2.9519653 and 24.0.8215888. The errors would point more at something in your setup...

@an1217
Copy link
Author

an1217 commented May 22, 2023

Works for me with both ndk 25.2.9519653 and 24.0.8215888. The errors would point more at something in your setup...
After I reset the environment, the following error appears. I have no way to solve it:
ld: error: undefined symbol: getifaddrs
>>> referenced by network_helper_nix.rs:108 (src/network_helper_nix.rs:108)
>>> sysinfo-e87a282ac6bee898.sysinfo.ed36b560-cgu.14.rcgu.o:(sysinfo::network_helper_nix::get_interface_address::h3f7e40636380f86f) in archive D:\bevy\andor\tar
get\aarch64-linux-android\debug\deps\libsysinfo-e87a282ac6bee898.rlib
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@paul-hansen
Copy link
Contributor

Running, I follow the tutorial on the official website and [Download command] sudo apt install android-sdk android-tools-adb android-tools-fastboot [environment variable] export ANDROID_SDK_ROOT=/home/anmingle/Android/Sdk export ANDROID_NDK_ROOT=/home/anmingle/Android/Sdk/21.4.7075529

Sorry for the following error when I tried to retry: Android SDK has no platforms installed. I've been trying for a long time

It looks like your ANDROID_NDK_ROOT variable is missing the /ndk directory.

- ANDROID_NDK_ROOT=/home/anmingle/Android/Sdk/21.4.7075529
+ ANDROID_NDK_ROOT=/home/anmingle/Android/Sdk/ndk/21.4.7075529

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior O-Android Specific to the Android mobile operating system
Projects
None yet
Development

No branches or pull requests

3 participants