-
Notifications
You must be signed in to change notification settings - Fork 503
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
Fixes packaging for current p4a develop branch #978
Conversation
Looking good thanks! I'll test it today and merge if it works OK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirm that fixes it. Before fix the end of buildozer android debug
log was:
[INFO]: # Your distribution was created successfully, exiting.
[INFO]: Dist can be found at (for now) /home/andre/workspace/QrScan/.buildozer/android/platform/build/dists/qrscan__armeabi-v7a
# Build the application #1
# Copy application source from /home/andre/workspace/QrScan/src
# Create directory /home/andre/workspace/QrScan/.buildozer/android/app
# Copy /home/andre/workspace/QrScan/src/main.py
# Create directory /home/andre/workspace/QrScan/.buildozer/android/app/qrscan
# Copy /home/andre/workspace/QrScan/src/qrscan/__init__.py
# Copy /home/andre/workspace/QrScan/src/qrscan/version.py
# Copy /home/andre/workspace/QrScan/src/qrscan/main.py
# Copy /home/andre/workspace/QrScan/src/qrscan/main.kv
# Package the application
# Captured version: 2019.0911
Traceback (most recent call last):
File "/home/andre/.local/bin/buildozer", line 10, in <module>
sys.exit(main())
File "/home/andre/.local/lib/python3.6/site-packages/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/home/andre/.local/lib/python3.6/site-packages/buildozer/__init__.py", line 1062, in run_command
self.target.run_commands(args)
File "/home/andre/.local/lib/python3.6/site-packages/buildozer/target.py", line 92, in run_commands
func(args)
File "/home/andre/.local/lib/python3.6/site-packages/buildozer/target.py", line 104, in cmd_debug
self.buildozer.build()
File "/home/andre/.local/lib/python3.6/site-packages/buildozer/__init__.py", line 222, in build
self.target.build_package()
File "/home/andre/.local/lib/python3.6/site-packages/buildozer/targets/android.py", line 978, in build_package
self._update_libraries_references(dist_dir)
File "/home/andre/.local/lib/python3.6/site-packages/buildozer/targets/android.py", line 1191, in _update_libraries_references
with io.open(project_fn, 'w', encoding='utf-8') as fd:
FileNotFoundError: [Errno 2] No such file or directory: '/home/andre/workspace/QrScan/.buildozer/android/platform/build/dists/qrscan/project.properties'
I've tried the fix with pip3 install --user --upgrade https://github.com/misl6/buildozer/archive/fix-dist-dir.zip
and starting a clean build rm -rf .buildozer/
Then I could produce the APK with buildozer android debug
, end log was:
[INFO]: Selecting java build tool:
[INFO]: Detected highest available build tools version to be 29.0.2
[INFO]: Building with gradle, as gradle executable is present
[DEBUG]: -> running gradlew assembleDebug
[DEBUG]:
[DEBUG]: > Task :compileDebugJavaWithJavac
[DEBUG]: Note: Some input files use or override a deprecated API.
[DEBUG]: Note: Recompile with -Xlint:deprecation for details.
[DEBUG]: Note: Some input files use unchecked or unsafe operations.
[DEBUG]: Note: Recompile with -Xlint:unchecked for details.
[DEBUG]:
[DEBUG]:
[DEBUG]: BUILD SUCCESSFUL in 3s
[DEBUG]: 27 actionable tasks: 27 executed
[INFO]: <- directory context /home/andre/workspace/QrScan/.buildozer/android/platform/python-for-android
[INFO]: # Copying APK to current directory
[INFO]: # APK filename not found in build output. Guessing...
[INFO]: # Found APK file: /home/andre/workspace/QrScan/.buildozer/android/platform/build-armeabi-v7a/dists/qrscan__armeabi-v7a/build/outputs/apk/debug/qrscan__armeabi-v7a-debug.apk
[INFO]: # Add version number to APK
[INFO]: # APK renamed to qrscan__armeabi-v7a-debug-2019.0911-.apk
[DEBUG]: -> running cp /home/andre/workspace/QrScan/.buildozer/android/platform/build-armeabi-v7a/dists/qrscan__armeabi-v7a/build/outputs/apk/debug/qrscan__armeabi-v7a-debug.apk qrscan__armeabi-v7a-debug-2019.0911-.apk
WARNING: Received a --sdk argument, but this argument is deprecated and does nothing.
No compiled python is present to zip, skipping.
No setup.py/pyproject.toml used, copying full private data into .apk.
Applying Java source code patches...
Applying patch: src/patches/SDLActivity.java.patch
# Android packaging done!
# APK qrscan-2019.0911-armeabi-v7a-debug.apk available in the bin directory
This PR fixes packaging for current
p4a
develop
branch.Needed due to changes in
p4a
PR kivy/python-for-android#1986.