Giter Site home page Giter Site logo

Comments (5)

liudonghua123 avatar liudonghua123 commented on August 15, 2024

I tried to update the com.android.tools.build:gradle which in android\gradle\Hello World\build.gradle from 3.5.3 to 4.2.2, and gradle which is in android\gradle\Hello World\gradle\wrapper\gradle-wrapper.properties from 5.4.1 to 6.9. Now another errors shown.

(beeware-venv) D:\code\python\beeware-tutorial\helloworld\android\gradle\Hello World>gradlew assembleDebug
Downloading https://services.gradle.org/distributions/gradle-6.9-all.zip
...............................................................................................................................................
Unzipping C:\Users\Liu.D.H\.gradle\wrapper\dists\gradle-6.9-all\dooywd8nv05k16orzxge2b1bs\gradle-6.9-all.zip to C:\Users\Liu.D.H\.gradle\wrapper\dists\gradle-6.9-all\dooywd8nv05k16orzxge2b1bs

Welcome to Gradle 6.9!

Here are the highlights of this release:
 - This is a small backport release.
 - Java 16 can be used to compile when used with Java toolchains
 - Dynamic versions can be used within plugin declarations
 - Native support for Apple Silicon processors

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

Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :app
Checking the license for package NDK (Side by side) 21.4.7075529 in D:\android\Android_SDK\licenses
License for package NDK (Side by side) 21.4.7075529 accepted.
Preparing "Install NDK (Side by side) 21.4.7075529 (revision: 21.4.7075529)".
"Install NDK (Side by side) 21.4.7075529 (revision: 21.4.7075529)" ready.
Installing NDK (Side by side) 21.4.7075529 in D:\android\Android_SDK\ndk\21.4.7075529
"Install NDK (Side by side) 21.4.7075529 (revision: 21.4.7075529)" complete.
"Install NDK (Side by side) 21.4.7075529 (revision: 21.4.7075529)" finished.
Checking the license for package Android SDK Build-Tools 30.0.2 in D:\android\Android_SDK\licenses
License for package Android SDK Build-Tools 30.0.2 accepted.
Preparing "Install Android SDK Build-Tools 30.0.2 (revision: 30.0.2)".
"Install Android SDK Build-Tools 30.0.2 (revision: 30.0.2)" ready.
Installing Android SDK Build-Tools 30.0.2 in D:\android\Android_SDK\build-tools\30.0.2
"Install Android SDK Build-Tools 30.0.2 (revision: 30.0.2)" complete.
"Install Android SDK Build-Tools 30.0.2 (revision: 30.0.2)" finished.

> Task :app:processDebugMainManifest
[androidx.vectordrawable:vectordrawable-animated:1.0.0] C:\Users\Liu.D.H\.gradle\caches\transforms-3\f14803a315f67746b9fb71068be927be\transformed\vectordrawable-animated-1.0.0\AndroidManifest.xml Warning:
        Package name 'androidx.vectordrawable' used in: androidx.vectordrawable:vectordrawable-animated:1.0.0, androidx.vectordrawable:vectordrawable:1.0.1.

> Task :app:generateJsonModelDebug
debug|armeabi-v7a :CMake Warning (dev) in CMakeLists.txt:
debug|armeabi-v7a :  No project() command is present.  The top-level CMakeLists.txt file must
debug|armeabi-v7a :  contain a literal, direct call to the project() command.  Add a line of
debug|armeabi-v7a :  code such as
debug|armeabi-v7a :    project(ProjectName)
debug|armeabi-v7a :  near the top of the file, but after cmake_minimum_required().
debug|armeabi-v7a :  CMake is pretending there is a "project(Project)" command on the first
debug|armeabi-v7a :  line.
debug|armeabi-v7a :This warning is for project developers.  Use -Wno-dev to suppress it.
debug|armeabi-v7a :CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.

> Task :app:generateJsonModelDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:generateJsonModelDebug'.
> error when building with cmake using D:\code\python\beeware-tutorial\helloworld\android\gradle\Hello World\app\src\main\cpp\CMakeLists.txt: Build command failed.
  Error while executing process D:\apps\cmake\bin\cmake.exe with arguments {-HD:\code\python\beeware-tutorial\helloworld\android\gradle\Hello World\app\src\main\cpp -DCMAKE_CXX_FLAGS=-std=c++14 -DCMAKE_FIND_ROOT_PATH=D:\code\python\beeware-tutorial\helloworld\android\gradle\Hello World\app\.cxx\cmake\debug\prefab\armeabi-v7a\prefab -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=D:\android\Android_SDK\ndk\21.4.7075529\build\cmake\android.toolchain.cmake -DANDROID_ABI=armeabi-v7a -DANDROID_NDK=D:\android\Android_SDK\ndk\21.4.7075529 -DANDROID_PLATFORM=android-21 -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_ANDROID_NDK=D:\android\Android_SDK\ndk\21.4.7075529 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\code\python\beeware-tutorial\helloworld\android\gradle\Hello World\app\build\intermediates\cmake\debug\obj\armeabi-v7a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=D:\code\python\beeware-tutorial\helloworld\android\gradle\Hello World\app\build\intermediates\cmake\debug\obj\armeabi-v7a -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=21 -BD:\code\python\beeware-tutorial\helloworld\android\gradle\Hello World\app\.cxx\cmake\debug\armeabi-v7a -GNinja}
  -- Configuring incomplete, errors occurred!
  See also "D:/code/python/beeware-tutorial/helloworld/android/gradle/Hello World/app/.cxx/cmake/debug/armeabi-v7a/CMakeFiles/CMakeOutput.log".

  CMake Warning (dev) in CMakeLists.txt:
    No project() command is present.  The top-level CMakeLists.txt file must
    contain a literal, direct call to the project() command.  Add a line of
    code such as

      project(ProjectName)

    near the top of the file, but after cmake_minimum_required().

    CMake is pretending there is a "project(Project)" command on the first
    line.
  This warning is for project developers.  Use -Wno-dev to suppress it.

  CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.


* 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 7m 35s
11 actionable tasks: 11 executed

(beeware-venv) D:\code\python\beeware-tutorial\helloworld\android\gradle\Hello World>

Maybe my local android sdk was too new and did not compatible with the android project.

from briefcase-android-gradle-template.

freakboy3742 avatar freakboy3742 commented on August 15, 2024

This appears to be an issue with a backwards incompatible change in the Android version of Gradle, and the Gradle task definition for Android native libraries. We've corrected this in an updated template; let us know if you continue to have problems.

from briefcase-android-gradle-template.

liudonghua123 avatar liudonghua123 commented on August 15, 2024

I redo the tutorial, but failed with another error, android template does not support python 3.10?

(beeware-venv) D:\code\python\beeware-tutorial\helloworld>briefcase create android
Downloading sdk-tools-windows-4333796.zip...
################################################## 100%
Install Android SDK...

    The Android tools provided by Google have license terms that you must accept
    before you may use those tools.

Warning: File C:\Users\Liu.D.H\.android\repositories.cfg could not be loaded.
7 of 7 SDK package licenses not accepted. 100% Computing updates...
Review licenses that have not been accepted (y/N)? y

1/7: License android-googletv-license:
......
All SDK package licenses accepted


[helloworld] Generating application template...
Using app template: https://github.com/beeware/briefcase-android-gradle-template.git, branch 3.10
Template does not support 3.10

(beeware-venv) D:\code\python\beeware-tutorial\helloworld>briefcase build android

[helloworld] Generating application template...
Using app template: https://github.com/beeware/briefcase-android-gradle-template.git, branch 3.10
Template does not support 3.10

(beeware-venv) D:\code\python\beeware-tutorial\helloworld>

from briefcase-android-gradle-template.

freakboy3742 avatar freakboy3742 commented on August 15, 2024

@liudonghua123 Correct - Python 3.10 is not yet supported on Android. Python3.9 is the most recently supported version.

from briefcase-android-gradle-template.

liudonghua123 avatar liudonghua123 commented on August 15, 2024

@freakboy3742 Thanks, I installed python 3.9 and now it worked.

(beeware-venv) D:\code\python\beeware-tutorial\helloworld>briefcase create android

[helloworld] Generating application template...
Using app template: https://github.com/beeware/briefcase-android-gradle-template.git, branch 3.9
Using existing template (sha 9500397dfdae89181337f571d7874ad2882e3ea3, updated Mon Jan 10 10:29:51 2022)

[helloworld] Installing support package...
Using support package https://briefcase-support.org/python?platform=android&version=3.9
... using most recent revision
Downloading Python-3.9-Android-support.b1.zip...
################################################## 100%
Unpacking support package...

[helloworld] Installing dependencies...
Collecting toga-android>=0.3.0.dev20
  Downloading toga_android-0.3.0.dev30-py3-none-any.whl (37 kB)
Collecting rubicon-java>=0.2.6
  Downloading rubicon_java-0.2.6-py3-none-any.whl (25 kB)
Collecting toga-core==0.3.0.dev30
  Using cached toga_core-0.3.0.dev30-py3-none-any.whl (489 kB)
Collecting travertino>=0.1.3
  Using cached travertino-0.1.3-py3-none-any.whl (15 kB)
Installing collected packages: travertino, toga-core, rubicon-java, toga-android
Successfully installed rubicon-java-0.2.6 toga-android-0.3.0.dev30 toga-core-0.3.0.dev30 travertino-0.1.3
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the 'C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python39\python.exe -m pip install --upgrade pip' command.

[helloworld] Installing application code...
Installing src/helloworld...

[helloworld] Installing application resources...
Unable to find 48px round variant for application icon; using default
Unable to find 72px round variant for application icon; using default
Unable to find 96px round variant for application icon; using default
Unable to find 144px round variant for application icon; using default
Unable to find 192px round variant for application icon; using default
Unable to find 48px square variant for application icon; using default
Unable to find 72px square variant for application icon; using default
Unable to find 96px square variant for application icon; using default
Unable to find 144px square variant for application icon; using default
Unable to find 192px square variant for application icon; using default

[helloworld] Created android\gradle\Hello World

(beeware-venv) D:\code\python\beeware-tutorial\helloworld>briefcase build android
[helloworld] Building Android APK...
Downloading https://services.gradle.org/distributions/gradle-7.2-all.zip
.....................................................................................................................................................
Unzipping C:\Users\Liu.D.H\.gradle\wrapper\dists\gradle-7.2-all\260hg96vuh6ex27h9vo47iv4d\gradle-7.2-all.zip to C:\Users\Liu.D.H\.gradle\wrapper\dists\gradle-7.2-all\260hg96vuh6ex27h9vo47iv4d

Welcome to Gradle 7.2!

Here are the highlights of this release:
 - Toolchain support for Scala
 - More cache hits when Java source files have platform-specific line endings
 - More resilient remote HTTP build cache behavior

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

Starting a Gradle Daemon (subsequent builds will be faster)

> Task :app:processDebugMainManifest
[androidx.vectordrawable:vectordrawable-animated:1.0.0] C:\Users\Liu.D.H\.gradle\caches\transforms-3\0ea6d96cb0e6b6514a59df9dfbcbdbe1\transformed\vectordrawable-animated-1.0.0\AndroidManifest.xml Warning:
        Package name 'androidx.vectordrawable' used in: androidx.vectordrawable:vectordrawable-animated:1.0.0, androidx.vectordrawable:vectordrawable:1.0.1.

> Task :app:externalNativeBuildDebug
Build native-lib_armeabi-v7a
ninja: Entering directory `D:\code\python\beeware-tutorial\helloworld\android\gradle\Hello World\app\.cxx\cmake\debug\armeabi-v7a'
Build native-lib_arm64-v8a
ninja: Entering directory `D:\code\python\beeware-tutorial\helloworld\android\gradle\Hello World\app\.cxx\cmake\debug\arm64-v8a'
Build native-lib_x86
ninja: Entering directory `D:\code\python\beeware-tutorial\helloworld\android\gradle\Hello World\app\.cxx\cmake\debug\x86'
Build native-lib_x86_64
ninja: Entering directory `D:\code\python\beeware-tutorial\helloworld\android\gradle\Hello World\app\.cxx\cmake\debug\x86_64'

> Task :app:compileDebugJavaWithJavac
Note: D:\code\python\beeware-tutorial\helloworld\android\gradle\Hello World\app\src\main\java\org\beeware\android\MainActivity.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

BUILD SUCCESSFUL in 2m 38s
31 actionable tasks: 31 executed

[helloworld] Built android\gradle\Hello World\app\build\outputs\apk\debug\app-debug.apk

(beeware-venv) D:\code\python\beeware-tutorial\helloworld>

from briefcase-android-gradle-template.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.