Couldn't build android app
bambier opened this issue · comments
Describe the bug
I'm trying to create and build android app as described in documents but I got to error when I do
briefcase build android
Steps to reproduce
briefcase new
cd helloworld
briefcase create android
briefcase build android
Expected behavior
Giving me APK/AAB file or just run it on virtual device? IDK! It's my first time 😕
Screenshots
Environment
- Operating System:
Ubuntu 24.04 LTS 64-bit
- Python version:
3.12
- Software versions:
- Briefcase:
0.3.19
- Toga:
0.4.5
- requirements.txt
- Briefcase:
Logs
(.env) ➜ helloworld briefcase build android
[helloworld] Updating app metadata...
Setting main module... done
[helloworld] Building Android APK...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'Hello World'.
> Could not resolve all files for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:8.2.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/8.2.1/gradle-8.2.1.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.2.1/gradle-8.2.1.pom
Required by:
project :
* 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.
BUILD FAILED in 3s
Building... errored
Error while building project.
Log saved to /home/nima/Desktop/python-projects/android/helloworld/logs/briefcase.2024_06_18-11_57_18.build.log
(.env) ➜ helloworld
briefcase.2024_06_18-11_57_18.build.log
Additional context
No response
Your GitHub activity indicates you may be in Iran, in which case you're probably being blocked either by US sanctions or by your own government. Unfortunately we don't know anything about how to circumvent this, so I suggest you search in general Android development forums. If they suggest editing your Gradle files, you can find them in your project under build/your_app_name/android
.
Well I found the problem. the problem was because of Khamenei, Who was blocked internet in Iran so briefcase
couldn't download gradle-8.2.1.pom
. After using VPN to bypass filtering and censorship of the internet, the problem was gone.
I'm going to close this issue, but it may be better to add options to download files manually.
Your GitHub activity indicates you may be in Iran, in which case you're probably being blocked either by US sanctions or by your own government. Unfortunately we don't know anything about how to circumvent this, so I suggest you search in general Android development forums. If they suggest editing your Gradle files, you can find them in your project under
build/your_app_name/android
.
Absolutely! I noticed just few minutes ago. This is really annoying that every thing is blocked in internet by our government 😠