plyer camera for android

493 views
Skip to first unread message

purushottam yadav

unread,
Feb 26, 2021, 4:46:11 PM2/26/21
to Kivy users support
https://github.com/rainmaker29/Android-Camera/issues/2

check out this bug , help me to solve this issue .

If any one of you know how to use camera in android  AS PER LATEST VERSIONS  , please share it  here .

Robert

unread,
Feb 26, 2021, 7:13:51 PM2/26/21
to Kivy users support
The only camera that seems to work on Android is Xcamera in Kivy Garden. It mostly works, but there are issues (see posts here).

Yesterday I put up a new camera implementation CameraXF - it is I think fully functional, and turnkey full screen - just instantiate the class.
It is beta (read this link for the implications), I'm looking for people to try it out.

purushottam yadav

unread,
Mar 1, 2021, 7:58:29 AM3/1/21
to Kivy users support


Readme is not clear .
Do you have any video showing how to run with this app on android .
I know how to generate a apk but this app structure is confusing to me .
I have virtual environment with kivy 2
but
where to place this app and how to run it ?

Can you please explain how to do it step by step .

Robert

unread,
Mar 1, 2021, 11:54:11 AM3/1/21
to Kivy users support
Xcamera?
As far as I know there are no step by step instructions.

purushottam yadav

unread,
Mar 1, 2021, 2:20:57 PM3/1/21
to Kivy users support



I finally made apk out of it and run it on mobile .
But where the images and videos are stored , I did not find the pictures and videos in gallery or anywhere on my android device .

THIS IS GETTING PRINTED ON THE TERMINAL WHEN I CLICK TO CAPTURE THE IMAGE  , I DONT FIND IMAGES OR VIDEOS IN MY DEVICES . 

03-02 00:29:30.138 7536 7536 I python : Traceback (most recent call last):
03-02 00:29:30.139 7536 7536 I python : File "jnius/jnius_proxy.pxi", line 50, in jnius.jnius.PythonJavaClass.invoke
03-02 00:29:30.139 7536 7536 I python : File "jnius/jnius_proxy.pxi", line 76, in jnius.jnius.PythonJavaClass._invoke
03-02 00:29:30.140 7536 7536 I python : File "/home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/app/cameraxf/listeners.py", line 94, in onClick
03-02 00:29:30.140 7536 7536 I python : File "/home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/app/cameraxf/cameraxf.py", line 216, in photo_take
03-02 00:29:30.141 7536 7536 I python : File "/home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/app/cameraxf/camerax.py", line 286, in photo_take
03-02 00:29:30.148 7536 7536 I python : AttributeError: type object 'android.provider.MediaStore$MediaColumns' has no attribute 'RELATIVE_PATH'
03-02 00:29:30.349 7536 7536 I python : Traceback (most recent call last):
03-02 00:29:30.351 7536 7536 I python : File "jnius/jnius_proxy.pxi", line 50, in jnius.jnius.PythonJavaClass.invoke
03-02 00:29:30.352 7536 7536 I python : File "jnius/jnius_proxy.pxi", line 76, in jnius.jnius.PythonJavaClass._invoke
03-02 00:29:30.353 7536 7536 I python : File "/home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/app/cameraxf/listeners.py", line 94, in onClick
03-02 00:29:30.355 7536 7536 I python : File "/home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/app/cameraxf/cameraxf.py", line 216, in photo_take
03-02 00:29:30.356 7536 7536 I python : File "/home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/app/cameraxf/camerax.py", line 286, in photo_take
03-02 00:29:30.357 7536 7536 I python : AttributeError: type object 'android.provider.MediaStore$MediaColumns' has no attribute 'RELATIVE_PATH'
03-02 00:29:30.526 7536 7536 I python : Traceback (most recent call last):
03-02 00:29:30.527 7536 7536 I python : File "jnius/jnius_proxy.pxi", line 50, in jnius.jnius.PythonJavaClass.invoke
03-02 00:29:30.527 7536 7536 I python : File "jnius/jnius_proxy.pxi", line 76, in jnius.jnius.PythonJavaClass._invoke
03-02 00:29:30.527 7536 7536 I python : File "/home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/app/cameraxf/listeners.py", line 94, in onClick
03-02 00:29:30.528 7536 7536 I python : File "/home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/app/cameraxf/cameraxf.py", line 216, in photo_take
03-02 00:29:30.528 7536 7536 I python : File "/home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/app/cameraxf/camerax.py", line 286, in photo_take

Robert

unread,
Mar 1, 2021, 4:02:23 PM3/1/21
to Kivy users support

purushottam yadav

unread,
Mar 2, 2021, 4:21:19 AM3/2/21
to Kivy users support
I used same spec file  which you provided in the github  to build apk  .
Message has been deleted

Robert

unread,
Mar 2, 2021, 2:20:30 PM3/2/21
to Kivy users support
In the example when capturing an image or video you will see a Toast to say the image is saved.
I understand this is not happening.

And the logcat showed the a message about RELATIVE_PATH, which occurs when capturing an image.
The cause of the error message about RELATIVE_PATH not existing is:
Says at the top right "Added in API level 29"
For some reason the apk is built with an api less than 29. I do not yet know what that is.

Try a 'buildozer appclean' followed by a build.
If there is still an issue, share the full Buildozer build log.

Robert

unread,
Mar 2, 2021, 5:20:02 PM3/2/21
to Kivy users support
We can figure this out.
Also do this, and share the result
ls ~/.buildozer/android/platform/android-sdk/platforms

purushottam yadav

unread,
Sep 6, 2021, 1:40:06 PM9/6/21
to Kivy users support

I got this error when I tried to  re built the app once again  . 




Listing '/home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/platform/build-arm64-v8a/dists/cameraxf__arm64-v8a/_python_bundle/_python_bundle/site-packages/usr'...
Listing '/home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/platform/build-arm64-v8a/dists/cameraxf__arm64-v8a/_python_bundle/_python_bundle/site-packages/usr/local'...
Listing '/home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/platform/build-arm64-v8a/dists/cameraxf__arm64-v8a/_python_bundle/_python_bundle/site-packages/usr/local/bin'...
[INFO]:    Detected highest available build tools version to be 31.0.0-rc4
[DEBUG]:   -> running gradlew assembleDebug
[DEBUG]:    Starting a Gradle Daemon, 5 busy and 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
[DEBUG]:   
[DEBUG]:    > Task :mergeExtDexDebug
[DEBUG]:    AGPBI: {"kind":"error","text":"Invoke-customs are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
[DEBUG]:    AGPBI: {"kind":"error","text":"Invoke-customs are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
[DEBUG]:    AGPBI: {"kind":"error","text":"Static interface methods are only supported starting with Android N (--min-api 24): androidx.camera.camera2.internal.compat.CameraManagerCompat$CameraManagerCompatImpl androidx.camera.camera2.internal.compat.CameraManagerCompat$CameraManagerCompatImpl.from(android.content.Context, android.os.Handler)","sources":[{}],"tool":"D8"}
[DEBUG]:    AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): void androidx.camera.core.impl.CameraCaptureResult.populateExifData(androidx.camera.core.impl.utils.ExifData$Builder)","sources":[{}],"tool":"D8"}
[DEBUG]:   
[DEBUG]:    > Task :mergeExtDexDebug FAILED
[DEBUG]:   
[DEBUG]:    FAILURE: Build failed with an exception.
[DEBUG]:   
[DEBUG]:    * What went wrong:
[DEBUG]:    Execution failed for task ':mergeExtDexDebug'.
[DEBUG]:    > Could not resolve all files for configuration ':debugRuntimeClasspath'.
[DEBUG]:       > Failed to transform camera-camera2-1.0.0.aar (androidx.camera:camera-camera2:1.0.0) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
[DEBUG]:          > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/368b8804cddb4c03f326d00a7807777e/camera-camera2-1.0.0/jars/classes.jar.]:    > IDLE
[DEBUG]:             > Error while dexing.
[DEBUG]:       > Failed to transform camera-view-1.0.0-alpha25.aar (androidx.camera:camera-view:1.0.0-alpha25) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
[DEBUG]:          > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/b7d398283465a35173d9394c17e4bde9/camera-view-1.0.0-alpha25/jars/classes.jar.
[DEBUG]:             > Error while dexing.
[DEBUG]:               The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
[DEBUG]:               android {
[DEBUG]:                   compileOptions {
[DEBUG]:                       sourceCompatibility 1.8
[DEBUG]:                       targetCompatibility 1.8
[DEBUG]:                   }
[DEBUG]:               }
[DEBUG]:               See https://developer.android.com/studio/write/java8-support.html for details. Alternatively, increase the minSdkVersion to 26 or above.
[DEBUG]:   
[DEBUG]:       > Failed to transform camera-lifecycle-1.0.0.aar (androidx.camera:camera-lifecycle:1.0.0) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
[DEBUG]:          > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/67a9381a8af2061a0a068593a74fcd39/camera-lifecycle-1.0.0/jars/classes.jar.
[DEBUG]:             > Error while dexing.
[DEBUG]:               The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
[DEBUG]:               android {
[DEBUG]:                   compileOptions {
[DEBUG]:                       sourceCompatibility 1.8
[DEBUG]:                       targetCompatibility 1.8
[DEBUG]:                   }
[DEBUG]:               }
[DEBUG]:               See https://developer.android.com/studio/write/java8-support.html for details. Alternatively, increase the minSdkVersion to 26 or above.
[DEBUG]:   
[DEBUG]:       > Failed to transform camera-core-1.0.0.aar (androidx.camera:camera-core:1.0.0) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
[DEBUG]:          > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/6e38b5c1f86a708fc0b0364161eb73c4/camera-core-1.0.0/jars/classes.jar.
[DEBUG]:             > Error while dexing.
[DEBUG]:   
[DEBUG]:    * Try:
[DEBUG]:    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.
[DEBUG]:   
[DEBUG]:    * Get more help at https://help.gradle.org
[DEBUG]:   
[DEBUG]:    Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
[DEBUG]:    Use '--warning-mode all' to show the individual deprecation warnings.
[DEBUG]:   
[DEBUG]:    BUILD FAILED in 1m 28s
[DEBUG]:    13 actionable tasks: 13 executed

Exception in thread background thread for pid 10974:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/purushottam2/.local/lib/python3.8/site-packages/sh.py", line 1637, in wrap
    fn(*rgs, **kwargs)
  File "/home/purushottam2/.local/lib/python3.8/site-packages/sh.py", line 2561, in background_thread
    handle_exit_code(exit_code)
  File "/home/purushottam2/.local/lib/python3.8/site-packages/sh.py", line 2265, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/purushottam2/.local/lib/python3.8/site-packages/sh.py", line 865, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/platform/build-arm64-v8a/dists/cameraxf__arm64-v8a/gradlew assembleDebug

  STDOUT:
Starting a Gradle Daemon, 5 busy and 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

> Task :mergeExtDexDebug
AGPBI: {"kind":"error","text":"Invoke-customs are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Invoke-customs are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Static interface methods are only supported starting with Android N (--min-api 24): androidx.camera.camera2.internal.compat.CameraManagerCompat$CameraManagerCompatImpl androidx.camera.camera2.internal.compat.CameraManagerCompat$CameraManagerCompatImpl.from(android.content.Context, android.os.Handler)","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): void androidx.camera.core.impl.CameraCaptureResult.populateExifData(androidx.camera.core.impl.utils.ExifData$Builder)","sources":[{}],"tool":"D8"}

> Task :mergeExtDexDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mergeExtDexDebug'.
> Could not resolve all files for configuration ':debugRuntimeClasspath'.
   > Failed to transform camera-camera2-1.0.0.aar (androidx.camera:camera-camera2:1.0.0) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/368b8804cddb4c03f326d00a7807777e/camera-camera2-1.0.0/jars/classes.jar.
         > Error while dexing.
   > Failed to transform camera-view-1.0.0-alpha25.aar (androidx.camera:camera-view:1.0.0-alpha25) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/b7d398283465a35173d9394c17e4bde9/camera-view-1.0.0-alpha25/jars/classes.jar.
         > Error while dexing.
           The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
           android {
               compileOptions {
                   sourceCompatibility 1.8
                   targetCompatibility 1.8
               }
           }
           See https://developer.android.com/studio/write/java8-support.html for details. Alternatively, increase the minSdkVersion to 26 or above.

   > Failed to transform camera-lifecycle-1.0.0.aar (androidx.camera:camera-lifecycle:1.0.0) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/67a9381a8af2061a0a068593a74fcd39/camera-lifecycle-1.0.0/jars/classes.jar.
         > Error while dexing.
           The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
           android {
               compileOptions {
                   sourceCompatibility 1.8
                   targetCompatibility 1.8
               }
           }
           See https://developer.android.com/studio/write/java8-support.html for details. Alternatively, increase the minSdkVersion to 26 or above.

   > Failed to transform camera-core-1.0.0.aar (androidx.camera:camera-core:1.0.0) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/6e38b5c1f86a708fc0b0364161eb73c4/camera-core-1.0.0/jars/classes.jar.
         > Error while dexing.

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.

BUILD FAILED in 1m 28s
13 actionable tasks: 13 executed


  STDERR:

WARNING: Received a --sdk argument, but this argument is deprecated and does nothing.
No setup.py/pyproject.toml used, copying full private data into .apk.
Applying Java source code patches...
Applying patch: src/patches/SDLActivity.java.patch
[INFO]:    STDOUT (last 20 lines of 98):
        * Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
BUILD FAILED in 1m 28s
13 actionable tasks: 13 executed

[INFO]:    STDERR:

[INFO]:    ENV:
export LESSOPEN='| /usr/bin/lesspipe %s'
export LANGUAGE='en_IN:en'
export USER='purushottam2'
export SSH_AGENT_PID='1658'
export XDG_SESSION_TYPE='x11'
export SHLVL='1'
export HOME='/home/purushottam2'
export OLDPWD='/home/purushottam2/Desktop/any_where/AW'
export DESKTOP_SESSION='ubuntu'
export GNOME_SHELL_SESSION_MODE='ubuntu'
export GTK_MODULES='gail:atk-bridge'
export PS1='(AW) \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
export MANAGERPID='1465'
export ANDROIDMINAPI='21'
export DBUS_STARTER_BUS_TYPE='session'
export DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/1000/bus,guid=690d793cf2d42a82094c5d9c61364406'
export COLORTERM='truecolor'
export MANDATORY_PATH='/usr/share/gconf/ubuntu.mandatory.path'
export IM_CONFIG_PHASE='1'
export LOGNAME='purushottam2'
export JOURNAL_STREAM='8:35747'
export _='/home/purushottam2/.local/bin/buildozer'
export ANDROIDAPI='30'
export XDG_SESSION_CLASS='user'
export DEFAULTS_PATH='/usr/share/gconf/ubuntu.default.path'
export USERNAME='purushottam2'
export TERM='xterm-256color'
export GNOME_DESKTOP_SESSION_ID='this-is-deprecated'
export ANDROIDNDK='/home/purushottam2/.buildozer/android/platform/android-ndk-r19c'
export WINDOWPATH='2'
export PATH='/home/purushottam2/.buildozer/android/platform/android-ndk-r19c/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86/bin/:/home/purushottam2/.buildozer/android/platform/android-ndk-r19c/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/:/home/purushottam2/.buildozer/android/platform/android-ndk-r19c:/home/purushottam2/.buildozer/android/platform/android-sdk/tools:/home/purushottam2/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/purushottam2/Desktop/any where/AW/bin:/home/purushottam2/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
export SESSION_MANAGER='local/purushottam2-HP-Laptop-15-bs1xx:@/tmp/.ICE-unix/1756,unix/purushottam2-HP-Laptop-15-bs1xx:/tmp/.ICE-unix/1756'
export INVOCATION_ID='4d1b0e2321df472b82e11d3ff56d6497'
export XDG_MENU_PREFIX='gnome-'
export GNOME_TERMINAL_SCREEN='/org/gnome/Terminal/screen/9a255a0b_d60e_4567_8e44_8ec1e77e27ce'
export XDG_RUNTIME_DIR='/run/user/1000'
export DISPLAY=':1'
export LANG='en_IN'
export XDG_CURRENT_DESKTOP='ubuntu:GNOME'
export ANDROIDSDK='/home/purushottam2/.buildozer/android/platform/android-sdk'
export XMODIFIERS='@im=ibus'
export XDG_SESSION_DESKTOP='ubuntu'
export XAUTHORITY='/run/user/1000/gdm/Xauthority'
export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
export GNOME_TERMINAL_SERVICE=':1.117'
export SSH_AUTH_SOCK='/run/user/1000/keyring/ssh'
export SHELL='/bin/bash'
export QT_ACCESSIBILITY='1'
export GDMSESSION='ubuntu'
export PACKAGES_PATH='/home/purushottam2/.buildozer/android/packages'
export LESSCLOSE='/usr/bin/lesspipe %s %s'
export GPG_AGENT_INFO='/run/user/1000/gnupg/S.gpg-agent:0:1'
export VIRTUAL_ENV='/home/purushottam2/Desktop/any where/AW'
export QT_IM_MODULE='ibus'
export PWD='/home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/platform/python-for-android'
export XDG_CONFIG_DIRS='/etc/xdg/xdg-ubuntu:/etc/xdg'
export DBUS_STARTER_ADDRESS='unix:path=/run/user/1000/bus,guid=690d793cf2d42a82094c5d9c61364406'
export XDG_DATA_DIRS='/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'
export VTE_VERSION='6003'
export ANDROID_NDK_HOME='/home/purushottam2/.buildozer/android/platform/android-ndk-r19c'
export ANDROID_HOME='/home/purushottam2/.buildozer/android/platform/android-sdk'

[INFO]:    COMMAND:
cd /home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/platform/build-arm64-v8a/dists/cameraxf__arm64-v8a && /home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/platform/build-arm64-v8a/dists/cameraxf__arm64-v8a/gradlew assembleDebug

[WARNING]: ERROR: /home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/platform/build-arm64-v8a/dists/cameraxf__arm64-v8a/gradlew failed!
# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name cameraxf --name CXF --version 0.1 --package org.test.cameraxf --minsdk 21 --ndk-api 21 --private /home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/app --permission CAMERA --permission RECORD_AUDIO --android-entrypoint org.kivy.android.PythonActivity --android-apptheme @android:style/Theme.NoTitleBar --orientation sensor --window --copy-libs --depend "androidx.camera:camera-core:1.0.0" --depend "androidx.camera:camera-camera2:1.0.0" --depend "androidx.camera:camera-lifecycle:1.0.0" --depend "androidx.camera:camera-view:1.0.0-alpha25" --depend "androidx.lifecycle:lifecycle-process:2.3.0" --arch arm64-v8a --color=always --storage-dir="/home/purushottam2/Desktop/any_where/AW/aw/.buildozer/android/platform/build-arm64-v8a" --ndk-api=21
# ENVIRONMENT:
#     SHELL = '/bin/bash'
#     SESSION_MANAGER = 'local/purushottam2-HP-Laptop-15-bs1xx:@/tmp/.ICE-unix/1756,unix/purushottam2-HP-Laptop-15-bs1xx:/tmp/.ICE-unix/1756'
#     QT_ACCESSIBILITY = '1'
#     COLORTERM = 'truecolor'
#     XDG_CONFIG_DIRS = '/etc/xdg/xdg-ubuntu:/etc/xdg'
#     XDG_MENU_PREFIX = 'gnome-'
#     GNOME_DESKTOP_SESSION_ID = 'this-is-deprecated'
#     LANGUAGE = 'en_IN:en'
#     MANDATORY_PATH = '/usr/share/gconf/ubuntu.mandatory.path'
#     GNOME_SHELL_SESSION_MODE = 'ubuntu'
#     SSH_AUTH_SOCK = '/run/user/1000/keyring/ssh'
#     XMODIFIERS = '@im=ibus'
#     DESKTOP_SESSION = 'ubuntu'
#     SSH_AGENT_PID = '1658'
#     GTK_MODULES = 'gail:atk-bridge'
#     DBUS_STARTER_BUS_TYPE = 'session'
#     PWD = '/home/purushottam2/Desktop/any_where/AW/aw'
#     XDG_SESSION_DESKTOP = 'ubuntu'
#     LOGNAME = 'purushottam2'
#     XDG_SESSION_TYPE = 'x11'
#     GPG_AGENT_INFO = '/run/user/1000/gnupg/S.gpg-agent:0:1'
#     XAUTHORITY = '/run/user/1000/gdm/Xauthority'
#     WINDOWPATH = '2'
#     HOME = '/home/purushottam2'
#     USERNAME = 'purushottam2'
#     IM_CONFIG_PHASE = '1'
#     LANG = 'en_IN'
#     LS_COLORS = 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
#     XDG_CURRENT_DESKTOP = 'ubuntu:GNOME'
#     VIRTUAL_ENV = '/home/purushottam2/Desktop/any where/AW'
#     VTE_VERSION = '6003'
#     GNOME_TERMINAL_SCREEN = '/org/gnome/Terminal/screen/9a255a0b_d60e_4567_8e44_8ec1e77e27ce'
#     INVOCATION_ID = '4d1b0e2321df472b82e11d3ff56d6497'
#     MANAGERPID = '1465'
#     LESSCLOSE = '/usr/bin/lesspipe %s %s'
#     XDG_SESSION_CLASS = 'user'
#     TERM = 'xterm-256color'
#     DEFAULTS_PATH = '/usr/share/gconf/ubuntu.default.path'
#     LESSOPEN = '| /usr/bin/lesspipe %s'
#     USER = 'purushottam2'
#     GNOME_TERMINAL_SERVICE = ':1.117'
#     DISPLAY = ':1'
#     SHLVL = '1'
#     QT_IM_MODULE = 'ibus'
#     DBUS_STARTER_ADDRESS = 'unix:path=/run/user/1000/bus,guid=690d793cf2d42a82094c5d9c61364406'
#     XDG_RUNTIME_DIR = '/run/user/1000'
#     PS1 = ('(AW) \\[\\e]0;\\u@\\h: '
 '\\w\\a\\]${debian_chroot:+($debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ ')
#     JOURNAL_STREAM = '8:35747'
#     XDG_DATA_DIRS = '/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'
#     PATH = ('/home/purushottam2/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/purushottam2/Desktop/any '
 'where/AW/bin:/home/purushottam2/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin')
#     GDMSESSION = 'ubuntu'
#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus,guid=690d793cf2d42a82094c5d9c61364406'
#     OLDPWD = '/home/purushottam2/Desktop/any_where/AW'
#     _ = '/home/purushottam2/.local/bin/buildozer'
#     PACKAGES_PATH = '/home/purushottam2/.buildozer/android/packages'
#     ANDROIDSDK = '/home/purushottam2/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/purushottam2/.buildozer/android/platform/android-ndk-r19c'
#     ANDROIDAPI = '30'
#     ANDROIDMINAPI = '21'
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2


Robert

unread,
Sep 6, 2021, 4:55:31 PM9/6/21
to Kivy users support

purushottam yadav

unread,
Sep 7, 2021, 1:47:57 AM9/7/21
to Kivy users support

what do you mean ?  I did not get you . 

Robert

unread,
Sep 7, 2021, 2:26:47 AM9/7/21
to Kivy users support
Looks like I don't know what you mean by "the app"

purushottam yadav

unread,
Sep 7, 2021, 4:31:00 AM9/7/21
to Kivy users support

https://github.com/Android-for-Python/CameraXF-Example  this one which you shared long back , I am trying to make apk out of it  .
I got above error .

Robert

unread,
Sep 7, 2021, 12:54:32 PM9/7/21
to Kivy users support
OK that is what I had guessed.
My next guess was the link I posted points to what is missing from buildozer.spec

purushottam yadav

unread,
Sep 25, 2021, 3:18:10 PM9/25/21
to Kivy users support
I did app clean  and tried to build apk again  still I get this error ,  and  I used your spec file  in project , nothing is missing in buildozer.spec file  .


[INFO]:    Detected highest available build tools version to be 31.0.0-rc4
[DEBUG]:   -> running gradlew assembleDebug
[DEBUG]:   
[DEBUG]:    > Configure project :
[DEBUG]:    WARNING: The option setting 'android.bundle.enableUncompressedNativeLibs=false' is experimental and unsupported.
[DEBUG]:    The current default is 'true'.
[DEBUG]:   
[DEBUG]:   
[DEBUG]:    > Task :mergeExtDexDebug FAILED
[DEBUG]:    AGPBI: {"kind":"error","text":"Invoke-customs are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
[DEBUG]:    AGPBI: {"kind":"error","text":"Invoke-customs are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
[DEBUG]:    AGPBI: {"kind":"error","text":"Static interface methods are only supported starting with Android N (--min-api 24): androidx.camera.camera2.internal.compat.CameraManagerCompat$CameraManagerCompatImpl androidx.camera.camera2.internal.compat.CameraManagerCompat$CameraManagerCompatImpl.from(android.content.Context, android.os.Handler)","sources":[{}],"tool":"D8"}
[DEBUG]:    AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): void androidx.camera.core.impl.CameraCaptureResult.populateExifData(androidx.camera.core.impl.utils.ExifData$Builder)","sources":[{}],"tool":"D8"}
[DEBUG]:   
[DEBUG]:    FAILURE: Build failed with an exception.
[DEBUG]:   
[DEBUG]:    * What went wrong:
[DEBUG]:    Execution failed for task ':mergeExtDexDebug'.
[DEBUG]:    > Could not resolve all files for configuration ':debugRuntimeClasspath'.
[DEBUG]:       > Failed to transform camera-camera2-1.0.0.aar (androidx.camera:camera-camera2:1.0.0) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
[DEBUG]:          > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/ee741ffae407bc52a8433eb696184392/camera-camera2-1.0.0-runtime.jar.
[DEBUG]:             > Error while dexing.
[DEBUG]:       > Failed to transform camera-view-1.0.0-alpha25.aar (androidx.camera:camera-view:1.0.0-alpha25) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
[DEBUG]:          > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/df54483f79f60322571f35f4db5c92b5/camera-view-1.0.0-alpha25-runtime.jar.
[DEBUG]:             > Error while dexing.
[DEBUG]:               The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
[DEBUG]:               android {
[DEBUG]:                   compileOptions {
[DEBUG]:                       sourceCompatibility 1.8
[DEBUG]:                       targetCompatibility 1.8
[DEBUG]:                   }
[DEBUG]:               }
[DEBUG]:               See https://developer.android.com/studio/write/java8-support.html for details. Alternatively, increase the minSdkVersion to 26 or above.
[DEBUG]:   
[DEBUG]:       > Failed to transform camera-lifecycle-1.0.0.aar (androidx.camera:camera-lifecycle:1.0.0) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
[DEBUG]:          > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/d9bebbe635f140dc5252fca1fec95a99/camera-lifecycle-1.0.0-runtime.jar.
[DEBUG]:             > Error while dexing.
[DEBUG]:               The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
[DEBUG]:               android {
[DEBUG]:                   compileOptions {
[DEBUG]:                       sourceCompatibility 1.8
[DEBUG]:                       targetCompatibility 1.8
[DEBUG]:                   }
[DEBUG]:               }
[DEBUG]:               See https://developer.android.com/studio/write/java8-support.html for details. Alternatively, increase the minSdkVersion to 26 or above.
[DEBUG]:   
[DEBUG]:       > Failed to transform camera-core-1.0.0.aar (androidx.camera:camera-core:1.0.0) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
[DEBUG]:          > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/16d50eb4e092ab64b1ee8ca1a77ac614/camera-core-1.0.0-runtime.jar.
[DEBUG]:             > Error while dexing.
[DEBUG]:   
[DEBUG]:    * Try:
[DEBUG]:    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.
[DEBUG]:   
[DEBUG]:    * Get more help at https://help.gradle.org
[DEBUG]:   
[DEBUG]:    Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
[DEBUG]:    Use '--warning-mode all' to show the individual deprecation warnings.
[DEBUG]:   
[DEBUG]:    BUILD FAILED in 19s
[DEBUG]:    13 actionable tasks: 13 executed
[DEBUG]:    > IDLE
[DEBUG]:    > IDLE
[DEBUG]:   
[DEBUG]:   
[DEBUG]:   
[DEBUG]:   
[DEBUG]:   
[DEBUG]:   
[DEBUG]:   
[DEBUG]:   
[DEBUG]:   
Exception in thread background thread for pid 71328:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/purushottam2/Desktop/project/tttt/lib/python3.7/site-packages/sh.py", line 1637, in wrap
    fn(*rgs, **kwargs)
  File "/home/purushottam2/Desktop/project/tttt/lib/python3.7/site-packages/sh.py", line 2561, in background_thread
    handle_exit_code(exit_code)
  File "/home/purushottam2/Desktop/project/tttt/lib/python3.7/site-packages/sh.py", line 2265, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/purushottam2/Desktop/project/tttt/lib/python3.7/site-packages/sh.py", line 865, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /home/purushottam2/Desktop/project/tttt/yyy/.buildozer/android/platform/build-arm64-v8a/dists/cameraxf/gradlew assembleDebug

  STDOUT:

> Configure project :
WARNING: The option setting 'android.bundle.enableUncompressedNativeLibs=false' is experimental and unsupported.
The current default is 'true'.


> Task :mergeExtDexDebug FAILED
AGPBI: {"kind":"error","text":"Invoke-customs are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Invoke-customs are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Static interface methods are only supported starting with Android N (--min-api 24): androidx.camera.camera2.internal.compat.CameraManagerCompat$CameraManagerCompatImpl androidx.camera.camera2.internal.compat.CameraManagerCompat$CameraManagerCompatImpl.from(android.content.Context, android.os.Handler)","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): void androidx.camera.core.impl.CameraCaptureResult.populateExifData(androidx.camera.core.impl.utils.ExifData$Builder)","sources":[{}],"tool":"D8"}

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mergeExtDexDebug'.
> Could not resolve all files for configuration ':debugRuntimeClasspath'.
   > Failed to transform camera-camera2-1.0.0.aar (androidx.camera:camera-camera2:1.0.0) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/ee741ffae407bc52a8433eb696184392/camera-camera2-1.0.0-runtime.jar.
         > Error while dexing.
   > Failed to transform camera-view-1.0.0-alpha25.aar (androidx.camera:camera-view:1.0.0-alpha25) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/df54483f79f60322571f35f4db5c92b5/camera-view-1.0.0-alpha25-runtime.jar.
         > Error while dexing.
           The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
           android {
               compileOptions {
                   sourceCompatibility 1.8
                   targetCompatibility 1.8
               }
           }
           See https://developer.android.com/studio/write/java8-support.html for details. Alternatively, increase the minSdkVersion to 26 or above.

   > Failed to transform camera-lifecycle-1.0.0.aar (androidx.camera:camera-lifecycle:1.0.0) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/d9bebbe635f140dc5252fca1fec95a99/camera-lifecycle-1.0.0-runtime.jar.
         > Error while dexing.
           The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
           android {
               compileOptions {
                   sourceCompatibility 1.8
                   targetCompatibility 1.8
               }
           }
           See https://developer.android.com/studio/write/java8-support.html for details. Alternatively, increase the minSdkVersion to 26 or above.

   > Failed to transform camera-core-1.0.0.aar (androidx.camera:camera-core:1.0.0) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /home/purushottam2/.gradle/caches/transforms-2/files-2.1/16d50eb4e092ab64b1ee8ca1a77ac614/camera-core-1.0.0-runtime.jar.
         > Error while dexing.

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.

BUILD FAILED in 19s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
BUILD FAILED in 19s
13 actionable tasks: 13 executed

[INFO]:    STDERR:

[INFO]:    ENV:
export LESSOPEN='| /usr/bin/lesspipe %s'
export LANGUAGE='en_IN:en'
export USER='purushottam2'
export SSH_AGENT_PID='1647'
export XDG_SESSION_TYPE='x11'
export SHLVL='1'
export HOME='/home/purushottam2'
export OLDPWD='/home/purushottam2/Desktop/project/tttt'
export DESKTOP_SESSION='ubuntu'
export GNOME_SHELL_SESSION_MODE='ubuntu'
export GTK_MODULES='gail:atk-bridge'
export PS1='(tttt) \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
export MANAGERPID='1458'
export ANDROIDMINAPI='21'
export DBUS_STARTER_BUS_TYPE='session'
export DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/1000/bus,guid=930736e21eb78ad25077cf81614f396f'
export COLORTERM='truecolor'
export MANDATORY_PATH='/usr/share/gconf/ubuntu.mandatory.path'
export IM_CONFIG_PHASE='1'
export LOGNAME='purushottam2'
export JOURNAL_STREAM='8:42769'
export _='/home/purushottam2/Desktop/project/tttt/bin/buildozer'
export ANDROIDAPI='30'
export XDG_SESSION_CLASS='user'
export DEFAULTS_PATH='/usr/share/gconf/ubuntu.default.path'
export USERNAME='purushottam2'
export TERM='xterm-256color'
export GNOME_DESKTOP_SESSION_ID='this-is-deprecated'
export ANDROIDNDK='/home/purushottam2/.buildozer/android/platform/android-ndk-r19c'
export WINDOWPATH='2'
export PATH='/home/purushottam2/.buildozer/android/platform/android-ndk-r19c/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86/bin/:/home/purushottam2/.buildozer/android/platform/android-ndk-r19c/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/:/home/purushottam2/.buildozer/android/platform/android-ndk-r19c:/home/purushottam2/.buildozer/android/platform/android-sdk/tools:/home/purushottam2/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/purushottam2/Desktop/project/tttt/bin:/home/purushottam2/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
export SESSION_MANAGER='local/purushottam2-HP-Laptop-15-bs1xx:@/tmp/.ICE-unix/1784,unix/purushottam2-HP-Laptop-15-bs1xx:/tmp/.ICE-unix/1784'
export INVOCATION_ID='099d30c96ceb42fea967707493a786a0'
export XDG_MENU_PREFIX='gnome-'
export GNOME_TERMINAL_SCREEN='/org/gnome/Terminal/screen/c54ea7ea_2e4f_4002_bbff_505668bbe403'
export XDG_RUNTIME_DIR='/run/user/1000'
export DISPLAY=':1'
export LANG='en_IN'
export XDG_CURRENT_DESKTOP='ubuntu:GNOME'
export ANDROIDSDK='/home/purushottam2/.buildozer/android/platform/android-sdk'
export XMODIFIERS='@im=ibus'
export XDG_SESSION_DESKTOP='ubuntu'
export XAUTHORITY='/run/user/1000/gdm/Xauthority'
export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
export GNOME_TERMINAL_SERVICE=':1.107'
export SSH_AUTH_SOCK='/run/user/1000/keyring/ssh'
export SHELL='/bin/bash'
export QT_ACCESSIBILITY='1'
export GDMSESSION='ubuntu'
export PACKAGES_PATH='/home/purushottam2/.buildozer/android/packages'
export LESSCLOSE='/usr/bin/lesspipe %s %s'
export GPG_AGENT_INFO='/run/user/1000/gnupg/S.gpg-agent:0:1'
export VIRTUAL_ENV='/home/purushottam2/Desktop/project/tttt'
export QT_IM_MODULE='ibus'
export PWD='/home/purushottam2/Desktop/project/tttt/yyy/.buildozer/android/platform/python-for-android'
export XDG_CONFIG_DIRS='/etc/xdg/xdg-ubuntu:/etc/xdg'
export DBUS_STARTER_ADDRESS='unix:path=/run/user/1000/bus,guid=930736e21eb78ad25077cf81614f396f'
export XDG_DATA_DIRS='/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'
export VTE_VERSION='6003'
export ANDROID_NDK_HOME='/home/purushottam2/.buildozer/android/platform/android-ndk-r19c'
export ANDROID_HOME='/home/purushottam2/.buildozer/android/platform/android-sdk'

[INFO]:    COMMAND:
cd /home/purushottam2/Desktop/project/tttt/yyy/.buildozer/android/platform/build-arm64-v8a/dists/cameraxf && /home/purushottam2/Desktop/project/tttt/yyy/.buildozer/android/platform/build-arm64-v8a/dists/cameraxf/gradlew assembleDebug

[WARNING]: ERROR: /home/purushottam2/Desktop/project/tttt/yyy/.buildozer/android/platform/build-arm64-v8a/dists/cameraxf/gradlew failed!
WARNING: Received a --sdk argument, but this argument is deprecated and does nothing.
No setup.py/pyproject.toml used, copying full private data into .apk.
Applying Java source code patches...
Applying patch: src/patches/SDLActivity.java.patch
# Command failed: /home/purushottam2/Desktop/project/tttt/bin/python3.7 -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name cameraxf --name CXF --version 0.1 --package org.test.cameraxf --minsdk 21 --ndk-api 21 --private /home/purushottam2/Desktop/project/tttt/yyy/.buildozer/android/app --permission CAMERA --permission RECORD_AUDIO --android-entrypoint org.kivy.android.PythonActivity --android-apptheme @android:style/Theme.NoTitleBar --orientation sensor --window --copy-libs --depend "androidx.camera:camera-core:1.0.0" --depend "androidx.camera:camera-camera2:1.0.0" --depend "androidx.camera:camera-lifecycle:1.0.0" --depend "androidx.camera:camera-view:1.0.0-alpha25" --depend "androidx.lifecycle:lifecycle-process:2.3.0" --arch arm64-v8a --color=always --storage-dir="/home/purushottam2/Desktop/project/tttt/yyy/.buildozer/android/platform/build-arm64-v8a" --ndk-api=21
# ENVIRONMENT:
#     SHELL = '/bin/bash'
#     SESSION_MANAGER = 'local/purushottam2-HP-Laptop-15-bs1xx:@/tmp/.ICE-unix/1784,unix/purushottam2-HP-Laptop-15-bs1xx:/tmp/.ICE-unix/1784'
#     QT_ACCESSIBILITY = '1'
#     COLORTERM = 'truecolor'
#     XDG_CONFIG_DIRS = '/etc/xdg/xdg-ubuntu:/etc/xdg'
#     XDG_MENU_PREFIX = 'gnome-'
#     GNOME_DESKTOP_SESSION_ID = 'this-is-deprecated'
#     LANGUAGE = 'en_IN:en'
#     MANDATORY_PATH = '/usr/share/gconf/ubuntu.mandatory.path'
#     GNOME_SHELL_SESSION_MODE = 'ubuntu'
#     SSH_AUTH_SOCK = '/run/user/1000/keyring/ssh'
#     XMODIFIERS = '@im=ibus'
#     DESKTOP_SESSION = 'ubuntu'
#     SSH_AGENT_PID = '1647'
#     GTK_MODULES = 'gail:atk-bridge'
#     DBUS_STARTER_BUS_TYPE = 'session'
#     PWD = '/home/purushottam2/Desktop/project/tttt/yyy'
#     XDG_SESSION_DESKTOP = 'ubuntu'
#     LOGNAME = 'purushottam2'
#     XDG_SESSION_TYPE = 'x11'
#     GPG_AGENT_INFO = '/run/user/1000/gnupg/S.gpg-agent:0:1'
#     XAUTHORITY = '/run/user/1000/gdm/Xauthority'
#     WINDOWPATH = '2'
#     HOME = '/home/purushottam2'
#     USERNAME = 'purushottam2'
#     IM_CONFIG_PHASE = '1'
#     LANG = 'en_IN'
#     LS_COLORS = 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
#     XDG_CURRENT_DESKTOP = 'ubuntu:GNOME'
#     VIRTUAL_ENV = '/home/purushottam2/Desktop/project/tttt'
#     VTE_VERSION = '6003'
#     GNOME_TERMINAL_SCREEN = '/org/gnome/Terminal/screen/c54ea7ea_2e4f_4002_bbff_505668bbe403'
#     INVOCATION_ID = '099d30c96ceb42fea967707493a786a0'
#     MANAGERPID = '1458'
#     LESSCLOSE = '/usr/bin/lesspipe %s %s'
#     XDG_SESSION_CLASS = 'user'
#     TERM = 'xterm-256color'
#     DEFAULTS_PATH = '/usr/share/gconf/ubuntu.default.path'
#     LESSOPEN = '| /usr/bin/lesspipe %s'
#     USER = 'purushottam2'
#     GNOME_TERMINAL_SERVICE = ':1.107'
#     DISPLAY = ':1'
#     SHLVL = '1'
#     QT_IM_MODULE = 'ibus'
#     DBUS_STARTER_ADDRESS = 'unix:path=/run/user/1000/bus,guid=930736e21eb78ad25077cf81614f396f'
#     XDG_RUNTIME_DIR = '/run/user/1000'
#     PS1 = ('(tttt) \\[\\e]0;\\u@\\h: '
 '\\w\\a\\]${debian_chroot:+($debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ ')
#     JOURNAL_STREAM = '8:42769'
#     XDG_DATA_DIRS = '/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'
#     PATH = '/home/purushottam2/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/purushottam2/Desktop/project/tttt/bin:/home/purushottam2/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
#     GDMSESSION = 'ubuntu'
#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus,guid=930736e21eb78ad25077cf81614f396f'
#     OLDPWD = '/home/purushottam2/Desktop/project/tttt'
#     _ = '/home/purushottam2/Desktop/project/tttt/bin/buildozer'
#     PACKAGES_PATH = '/home/purushottam2/.buildozer/android/packages'
#     ANDROIDSDK = '/home/purushottam2/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/purushottam2/.buildozer/android/platform/android-ndk-r19c'
#     ANDROIDAPI = '30'
#     ANDROIDMINAPI = '21'
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2


Message has been deleted

Robert

unread,
Sep 25, 2021, 5:17:11 PM9/25/21
to Kivy users support
CameraXF depends on the master version of Buildozer installed locally after 2021/04/21 (this adds android.enable_androidx). Update your version with pip3 if necessary.

purushottam yadav

unread,
Sep 29, 2021, 2:13:03 AM9/29/21
to Kivy users support
Using master version of buildozer , I made apk out of your project , It is  working fine  . 

I have a REQUEST , video recording with front camera is not possible , only back camera is availble for  video recording .  Can you please include front camera  too for  video recording  .

Robert

unread,
Sep 29, 2021, 2:39:31 AM9/29/21
to Kivy users support
Yes, the p4a master was just updated from the develop version. I updated the .spec a few days ago.

I won't be doing any further work on this example. Its an example, you can modify your copy in any way you wish.

I will, probably some time this year, contribute a different camera example, perhaps that one......

purushottam yadav

unread,
Sep 12, 2022, 12:25:17 PM9/12/22
to Kivy users support
  In my previous comment , I said   "    I have a REQUEST , video recording with front camera is not possible , only back camera is availble for  video recording .  Can you please include front camera  too for  video recording  .   "       

and  you  robert replied  "  I   will, probably some time this year, contribute a different camera example, perhaps that one......   " ,  what is that new camera example ? 
and  can you update this camera with my request ?

Robert

unread,
Sep 12, 2022, 5:14:08 PM9/12/22
to Kivy users support
You can find a list of all the examples I have written in https://github.com/Android-for-Python/INDEX-of-Examples

And the photo example does record video from the Android front camera.
Reply all
Reply to author
Forward
0 new messages