Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

General programming discussion • How to setup environment for android development with Gradle and Kotlin

$
0
0
Hi, I'm trying to create an Android app on my RPi 400, but I find setting environment up hard.
Sorry if this a wrong forum.

Android Studio is out of the question, because it's too heavy, so tools have to be installed manually.

My steps were:
  1. Installed sdkman! and then Gradle and Kotlin using it.
  2. Installed command-line tools (36) only as many guides have suggested, updated the PATH, and then using the sdkmanager tool I've installed the build-tools (36), platform-tools (36.0.2), and platform (36) packages.
  3. Initialized a minimal application project using Gradle, applying Android Gradle Plugin and Kotlin plugin to it. Building was successful..
I want to make a GUI app so want to see what's going on, but adb (Android Debug Bridge) doesn't work... First of all, it's an x86_64 app (probably because no one cares), so it's running through box64 that outputs these warnings before running and then I get a SIGSEGV:

Code:

[BOX64] Warning: Weak Symbol __gmon_start__ not found, cannot apply R_X86_64_JUMP_SLOT @0x1008711f0 (0x84aca6)[BOX64] Warning: Weak Symbol __gcov_dump not found, cannot apply R_X86_64_JUMP_SLOT @0x100871730 (0x84b726)[BOX64] Warning: Weak Symbol __gcov_flush not found, cannot apply R_X86_64_JUMP_SLOT @0x100871738 (0x84b736)[BOX64] Warning: Weak Symbol OPENSSL_memory_alloc not found, cannot apply R_X86_64_JUMP_SLOT @0x1008717e8 (0x84b896)[BOX64] Warning: Weak Symbol OPENSSL_memory_free not found, cannot apply R_X86_64_JUMP_SLOT @0x1008717f0 (0x84b8a6)[BOX64] Warning: Weak Symbol OPENSSL_memory_get_size not found, cannot apply R_X86_64_JUMP_SLOT @0x1008717f8 (0x84b8b6)[BOX64] 8301|SIGSEGV @0x7fbd0a4150 (???(/lib/aarch64-linux-gnu/libc.so.6+0xa4150)) (x64pc=0x300503d3/"box64/syscall + 0x13", rsp=0x7fbcbe38a8, stack=0x7fbc3e5000:0x7fbcbe5000 own=(nil) fp=0x7fbcbe38d0), for accessing 0x1 (code=1/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=(nil)
After box64's output, the adb itself outputs:

Code:

ADB server didn't ACKFull server startup log: /tmp/adb.1000.logServer had pid: 8301* failed to start daemonadb: failed to check server version: cannot connect to daemon
There is no log, btw. Maybe I did a bad job, but I couldn't find anything useful to help me.
  • Tried using the apt package. Installed adb (then android-platform-tools, uninstalling previous), and the daemon now starts.
  • Enabled USB debug on my phone and connected it to Pi, but it doesn't list in adb devices.
Figured that maybe it's something to do with SDK and adb version incompatibility (eh..), so I've installed complete SDK through apt (android-sdk android-sdk-build-tools android-sdk-helper android-sdk-platform-tools) as someone on the forum had suggested, but still no luck as now the project build fails because of unsigned licenses. But there is no tool in apt to sign them!

Now I'm thinking that maybe Pi just failed to register my phone as a device.. But I can't be really sure at this point, as I'm getting very upset with how much time I've wasted on this...

Statistics: Posted by tymurmchyk — Wed Jan 07, 2026 1:18 am



Viewing all articles
Browse latest Browse all 8082

Trending Articles