09.1 Build APK (without Android Studio)
We are so damn close!! This is (hopefully) the final step to SMS enlightenment!! Let's compile this damn APK already!!
Navigate back to the root of the frontend folder
cd ~/shSMS/shsms-frontend
Build the app and sync with some cool Android stuff
npm run build && npx cap sync android
If that last command gave you an error that mentions Java or JDK or something along those lines, try downloading JDK 8. I'm not anything close to an expert on anything Java, but this worked for me every time when testing on different devices.
sudo apt-get install oracle-java8-installer
(Debian)sudo pacman -S jdk8-openjdk
(Manjaro)Navigate to the 'android' folder
cd android
Build the APK
./gradlew assembleDebug
Navigate to where the APK was saved
cd app/build/outputs/apk/debug
Make sure your APK is there
ll
(lists the files in the current directory)
Do you see app-debug.apk
? If so CONGRATULATIONS! 🎉
I said this was the last step, but our APK isn't on our device yet, soooo I guess there's one more, but heck, it's easy I swear!!
Troubleshooting:
If you get an error while building that says something about a
local.properties
file not being there. Navigate toshsms-frontend/android
and create a file calledlocal.properties
. Inside that file addsdk.dir=/home/<username>/path-to-sdk/Sdk
. So for me it'ssdk.dir=/home/pyewacket/Android/Sdk
. Save the file and try to rebuild again.
Last updated