Jeffrey Walton <noloa...@gmail.com> ezt írta (időpont: 2025. máj. 25., V, 18:09): > > On Sun, May 25, 2025 at 9:28 AM Csányi Pál <csanyi...@gmail.com> wrote: > > > > Csányi Pál <csanyi...@gmail.com> ezt írta (időpont: 2025. máj. 21., Sze, > > 5:44): > > > > > > Alex King <a...@king.net.nz> ezt írta (időpont: 2025. máj. 21., Sze 3:02): > > >> > > >> Please do update the wiki so that when I (and others) come to do the > > >> same (which I'm planning to do soon) we can benefit from your learning. > > >> > > >> Thanks, > > >> Alex > > > > > > > > > I'm happy to do that, I was thinking about it anyway. > > > > > > I just might need help to use the signapk command correctly in the make > > > file. > > > > I was wrong, we should not use the signapk package, but the > > installable apksigner package. > > > > Now I see only one problem that prevents the make command from running > > successfully: > > when I run make I get following messages: > > > > aapt package -f -m -J src -S res -M AndroidManifest.xml -I > > /usr/lib/android-sdk/platforms/android-23/android.jar > > javac -bootclasspath > > /usr/lib/android-sdk/platforms/android-23/android.jar -classpath src > > -source 1.7 -target 1.7 src/coffee/source/helloworld/HelloWorld.java > > src/coffee/source/helloworld/R.java > > warning: [options] source value 7 is obsolete and will be removed in a > > future release > > warning: [options] target value 7 is obsolete and will be removed in a > > future release > > warning: [options] To suppress warnings about obsolete options, use > > -Xlint:-options. > > 3 warnings > > [ -e dex ] || mkdir dex > > /usr/lib/android-sdk/build-tools/debian/dx --dex --verbose > > --min-sdk-version=19 --output=dex/classes.dex src > > make: /usr/lib/android-sdk/build-tools/debian/dx: No such file or directory > > make: *** [Makefile:25: dex/classes.dex] Error 127 > > > > and I can't figure out how to get the dx command, because on my Debian > > Bookworm system there is no such command! > > > > Can this problem be solved so that I can access on my system only > > Android SDK and development tools already available in Debian? > > It looks like the various android installers, like > google-android-build-tools-19.1.0-installer, include aapt, aidl, > dexdump, and dx. Or they used to. > > See <https://packages.debian.org/stable/allpackages>. > > Jeff
I see, but when I install, say, the Google's Android SDK Build-Tools 23.0.1 Installer (aapt, aidl, dexdump, dx) package, then apt, or Synaptic package manager will remove the following debian packages: aapt aidl android-sdk android-sdk-build-tools apksigner split-select zipalign I thought that the android-sdk debian package should include dx. No? Anyway, according to the tutorial https://wiki.debian.org/AndroidTools/IntroBuildingApps you need the android-sdk debian package, and I'm about to uninstall it and the other debian packages mentioned above by installing the google-android-sdk-build-tools-23.0.1-installer package. Then I guess I'm not following the tutorial and its purpose. No? Well, I installed the google-android-sdk-build-tools-23.0.1-installer package, then ran the make clean make commands, and I got this error message: make aapt package -f -m -J src -S res -M AndroidManifest.xml -I /usr/lib/android-sdk/platforms/android-23/android.jar javac -bootclasspath /usr/lib/android-sdk/platforms/android-23/android.jar -classpath src -source 1.7 -target 1.7 src/coffee/source/helloworld/HelloWorld.java src/coffee/source/helloworld/R.java warning: [options] source value 7 is obsolete and will be removed in a future release warning: [options] target value 7 is obsolete and will be removed in a future release warning: [options] To suppress warnings about obsolete options, use -Xlint:-options. 3 warnings [ -e dex ] || mkdir dex /usr/lib/android-sdk/build-tools/23.0.1/dx --dex --verbose --min-sdk-version=19 --output=dex/classes.dex src unknown option: --min-sdk-version=19 Then I change the following lines in Makefile like this: dex/classes.dex: $(CLASSES) <------>[ -e dex ] || mkdir dex #<----->$(ANDROIDSDK)/dx --dex --verbose --min-sdk-version=$(MINSDK) --output=$@ src <------>$(ANDROIDSDK)/dx --dex --verbose --output=$@ src and run make clean and make again with the following output: aapt package -f -m -J src -S res -M AndroidManifest.xml -I /usr/lib/android-sdk/platforms/android-23/android.jar javac -bootclasspath /usr/lib/android-sdk/platforms/android-23/android.jar -classpath src -source 1.7 -target 1.7 src/coffee/source/helloworld/HelloWorld.java src/coffee/source/helloworld/R.java warning: [options] source value 7 is obsolete and will be removed in a future release warning: [options] target value 7 is obsolete and will be removed in a future release warning: [options] To suppress warnings about obsolete options, use -Xlint:-options. 3 warnings [ -e dex ] || mkdir dex /usr/lib/android-sdk/build-tools/23.0.1/dx --dex --verbose --output=dex/classes.dex src ignored resource src/./coffee/source/helloworld/HelloWorld.java processing src/./coffee/source/helloworld/R$id.class... processing src/./coffee/source/helloworld/R$attr.class... processing src/./coffee/source/helloworld/R.class... ignored resource src/./coffee/source/helloworld/R.java processing src/./coffee/source/helloworld/HelloWorld.class... processing src/./coffee/source/helloworld/R$layout.class... aapt package -f -v -F helloworld.unsigned.apk -I /usr/lib/android-sdk/platforms/android-23/android.jar -M AndroidManifest.xml -S res dex Processing raw dir 'dex' Found 1 asset file in dex Configurations: (default) Files: layout/activity_main.xml Src: () res/layout/activity_main.xml AndroidManifest.xml Src: () AndroidManifest.xml classes.dex Src: () dex/classes.dex Resource Dirs: Type layout layout/activity_main.xml Src: () res/layout/activity_main.xml Including resources from package: /usr/lib/android-sdk/platforms/android-23/android.jar applyFileOverlay for drawable applyFileOverlay for layout applyFileOverlay for anim applyFileOverlay for animator applyFileOverlay for interpolator applyFileOverlay for transition applyFileOverlay for xml applyFileOverlay for raw applyFileOverlay for color applyFileOverlay for menu applyFileOverlay for mipmap (new resource id activity_main from res/layout/activity_main.xml) Creating 'helloworld.unsigned.apk' Writing all files... 'AndroidManifest.xml' (compressed 62%) 'classes.dex' (compressed 50%) 'res/layout/activity_main.xml' (compressed 49%) 'resources.arsc' (not compressed) Generated 4 files Included 0 files from jar/zip files. Checking for deleted files Done! zipalign -f -p 4 helloworld.unsigned.apk helloworld.aligned.apk apksigner sign --ks keystore.jks --ks-key-alias androidkey --ks-pass pass:android --key-pass pass:android --out helloworld.apk helloworld.aligned.apk make: apksigner: No such file or directory make: *** [Makefile:12: helloworld.apk] Error 127 Well, I'm getting nowhere again. So what's the solution to achieve the goal of the tutorial? -- Best wishes by Pál Csányi!