Open ibuda opened 3 years ago
Hi,
I tried to build your app, it builds fine, but once I use it on my Xiaomi MI 9, the application asks for permissions, which I allow all, and then, once I press Start recording, the application just crashes. Did you have any similar problems when running the app?
Thanks!
Hello @ibuda, have you looked at the logcat?, that would help us to see any errors
I have no similar problems with the current version on my phone
I also crashed, this is my logcat:
Traceback (most recent call last):
File "/Users/***/Downloads/kivy-audio-recorder-master/.buildozer/android/app/main.py", line 8, in <module>
File "/Users/***/Downloads/kivy-audio-recorder-master/.buildozer/android/app/helpers.py", line 8, in <module>
File "/Users/***/Downloads/kivy-audio-recorder-master/.buildozer/android/platform/build-arm64-v8a/build/python-installs/com.guazuapp.audiorecorder/arm64-v8a/jnius/reflect.py", line 211, in autoclass
File "jnius/jnius_export_func.pxi", line 26, in jnius.jnius.find_javaclass
File "jnius/jnius_utils.pxi", line 91, in jnius.jnius.check_exception
jnius.jnius.JavaException: JVM exception occurred: Didn't find class "android.support.v4.content.ContextCompat" on path: DexPathList[[zip file "/data/app/com.guazuapp.com.guazuapp.audiorecorder-VlBLCLnLztLBFTFlhMIsqg==/base.apk"],nativeLibraryDirectories=[/data/app/com.guazuapp.com.guazuapp.audiorecorder-VlBLCLnLztLBFTFlhMIsqg==/lib/arm64, /data/app/com.guazuapp.com.guazuapp.audiorecorder-VlBLCLnLztLBFTFlhMIsqg==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]] java.lang.ClassNotFoundException
So I added in the buildozer.spec file:
- android.add_aars = support-compat-28.0.0.aar
+ android.gradle_dependencies = androidx.core:core:1.6.0
+ android.enable_androidx = True
modify helpers.py
if platform == "android":
PythonActivity = autoclass("org.kivy.android.PythonActivity").mActivity
Context = autoclass('android.content.Context')
- ContextCompat = autoclass('android.support.v4.content.ContextCompat')
+ ContextCompat = autoclass('androidx.core.content.ContextCompat')
Execute the compilation command:
buildozer android clean
buildozer android debug
And it works.
Hi,
I tried to build your app, it builds fine, but once I use it on my Xiaomi MI 9, the application asks for permissions, which I allow all, and then, once I press Start recording, the application just crashes. Did you have any similar problems when running the app?
Thanks!