Closed nvanheuverzwijn closed 1 year ago
:star_struck:
Wow, thank you so much! The build-system right now is a mess, so I did not expect anyone to work on the repo!
Did you get everything to work? The Zxing-library right now needs to be built manually, because my Makefile/gradle-integration does fails to detect the Android SDK properly. Tell me if you need some extra instructions to get everything to work.
@MrApplejuice Hey! I'm glad it helps!
I did not take the time to build and install on the emulator yet. So far, I can run the test suite fine so that's a win :) I tried to build it on my windows machine but I couldn't figure out how to make a build system work on windows so I installed brand new linux box (debian 11) just for that :)
I had to use the gradlew script and export the JAVA_HOME to the correct java jdk. I couldn't make it work on android studio for some reason. I think Android studio ship with JAVA17 and this project requires JAVA18 so I struggle with that. I'm not a JAVA developer so I'm really not familiar with gradle and the whole java ecosystem, even less with android.
Anyways, I'm hacking on it today so hopefully, I get something done with it and share whatever I do with you :)
Cheers.
I tried to build it on my windows machine but I couldn't figure out how to make a build system work on windows
Yeah, sorry about that. I started with what I know and half of the build system is a GNU Makefile right now. I think it would be brilliant if all of that code could maybe be wrapped in either a Python script, or gradle itself. When I started this project, I knew Java, a bit of Kotlin (should have committed to Kotlin immediately instead of starting the project with Java) and barely anything about gradle. That has improved a lot now.
However, I can imagine it being an uphill battle when it comes to getting things set up on Windows right now :-(
I had to use the gradlew script and export the JAVA_HOME to the correct java jdk. I couldn't make it work on android studio for some reason. I think Android studio ship with JAVA17 and this project requires JAVA18 so I struggle with that. I'm not a JAVA developer so I'm really not familiar with gradle and the whole java ecosystem, even less with android.
Well, then just a warning: I though I got it working, but the libzxing thing really not working well right now. And indeed, I also had trouble with the java version etc.
To get it to work right now, use Linux, yes and then do the following from the console (after updating all submodules etc):
app/src/submodules/zxing-cpp/wrappers/android/zxingcpp/build.gradle
and comment out the line abiFilters
: ndk {
// speed up build: compile only arm versions
- abiFilters 'armeabi-v7a', 'arm64-v8a'
+ // abiFilters 'armeabi-v7a', 'arm64-v8a'
}
If you do not do this, you will not be able to run the app in the emulator, which is really annoying!
export ANDROID_HOME=~/local/android-sdk/
# ~/local/android-sdk/ is the folder than contains the Android SDK - check for the presence of folders like:
# - emulator
# - sources
# - platforms
# - ndk
# - (bunch more)
export JAVA_HOME=PATH-TO/android-studio/jbr/
# This worked for me. Take the embedded java-version that ships with android-studio itself. So
# PATH-TO/android-studio/ is a path pointing INSIDE the Android-Studio installation
# Then build:
make -f resources.makefile libraries
This does work for me. Sorry for the total mess with this. I wanted to integrate it properly but got interrupted by the BabyBuddy 2.0 Release, which requires urgent patching so that the app does not break later this month.
Wow! Great! Exactly what I was searching for :p I had this error, not finding this library when starting the application! Thanks!
This PR fixes some build related problem:
app/src/main/res/drawable-xxxdhpi/
is required for the build to run properly