Installing android studio on puppy linux.

Issues and / or general discussion relating to Puppy


Moderator: Forum moderators

Post Reply
os62
Posts: 12
Joined: Tue Jan 28, 2025 7:56 pm
Contact:

Installing android studio on puppy linux.

Post by os62 »

Hi, so I am an old coder, and I have used various versions of puppy linux for a while, (tahr, xen, bionic etc), often old 32 bit versions rather than constant updating. They are simple and fast, and the devx.sfs package idea is a nice simple way to get gnu c up and running.

I have fossapup 9.5 (64 bit) running, and I was trying to install android studio for 64 bit linux. (ladybug 2024.2.2)
I am doing this indirectly, downloading a zip with the linux version, then copying to the pup and unzipping.

When i run "bin/studio" i get "no android sdk found" etc. Can this be downloaded as a zip? Does it have to have net access to start? I thought all that was included in the massive 1.2gb download. (having all that just to get a c compiler running for android is another issue...)

Am i missing java JRE or something like that?

Has anyone else here gone through all this with a pup?

Maybe I should run the Windows version of studio under Wine.

Also I dont know whether fossapup is the best choice, I was just trying to find an upto date stable pup similar to tahr/xen/bionic etc. There are many to choose from.

Where is the best place to get the right apps for that pup?
when i install/run wine64-5.5_v4.1.pet it says:
"error: ld.so: object 'usr/lib/x87-64-linux-gnu/libgtk3-nocsd.so.0' from ld-preload cannot be preloaded.."
obviously i have the wrong version.

Anyway thats a lot of questions for now! Any help appreciated..

User avatar
Keef
Posts: 291
Joined: Tue Dec 03, 2019 8:05 pm
Has thanked: 3 times
Been thanked: 80 times

Re: Installing android studio on puppy linux.

Post by Keef »

Hello os62

Have you tried running bin/studio.sh instead of just studio?

EDIT
Scratch that, I don't think it makes any difference. Were you connected to the interent when you ran it? The launcher should offer to download and install the SDK.

os62
Posts: 12
Joined: Tue Jan 28, 2025 7:56 pm
Contact:

Re: Installing android studio on puppy linux.

Post by os62 »

thanks, yes it did. I was trying to download the components separately, so when i build an app i know exactly what version of the compiler, libs, sdk etc i am building against. That way you can always recreate the exact same binary with the same tools later. I often code offline anyway.

I found the sdk, and extracted it to a dir, but it refuses to accept it, it just wants to connect for a download, so i might be stuck with that.

For some reason fossa9.5 is not connecting, it did before. I may just reinstall the latest pup, the wine is broken on this one.

thanks again!

robertstein
Posts: 10
Joined: Thu Jun 13, 2024 5:23 pm

Re: Installing android studio on puppy linux.

Post by robertstein »

If the SDK keeps insisting on a download, it might be worth checking if there's a config file pointing to online sources or if it needs a specific directory structure.

Regarding Fossa9.5, if it was connecting before but isn't now, maybe double-check the network settings or try clearing any cached connections. Reinstalling the latest Pup sounds like a good backup plan, especially if Wine is acting up.

User avatar
bigpup
Moderator
Posts: 7512
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 1021 times
Been thanked: 1682 times

Re: Installing android studio on puppy linux.

Post by bigpup »

I am going to guess, that Fossapup64 9.5 is just too old a Puppy, to do this in.

It is going on 6 years old, and is a snapshot of what core Linux programs and files, were available, at that time point.

Most likely this needs newer versions of required dependency software, to run.

I just tried this in BookwormPup64 10.0.9 Version 10.0.10 is now available.
This being one of the newest Puppy versions. It has the latest versions of Linux core programs and files.

Downloaded android-studio-2024.2.2.14-linux.tar.gz
https://developer.android.com/studio

Used pExtract program to UN-compress it, and it made a directory android-studio with all the contents in it.

Opened this android-studio directory.

Opened the bin directory in it.

Right clicked on the file studio.sh and selected run in terminal.

It started up, running the setup for installing, and popping up different option and selection windows, about doing the install.

I did not really want to continue, but it seemed to be running OK.

Note:
Inside the directory android-studio is a installation text file (Install-Linux-tar.txt)
If you left click on it, should open in a text reader program, so you can read it.
It tells you basically what to do.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

os62
Posts: 12
Joined: Tue Jan 28, 2025 7:56 pm
Contact:

Re: Installing android studio on puppy linux.

Post by os62 »

ok, thanks everyone for the suggestions.
i went over to a new bookworm64 install setup just for android studio, and i managed to get a little further with it. Thwn i saw it had used the monthly mobile quota on the mobile connection, on downloads and coms with googl! How big do these things need to be? The studio is annoying, a riot of slow, low contrast editor screens.

All I really want is a C99 compiler to build apk's from SDL programs i have, ie:
viewtopic.php?p=144769

It seems it might be better to just use the ndk toolset. i do have some info on building sdl for android, so I guess i have to work through all that..

os62
Posts: 12
Joined: Tue Jan 28, 2025 7:56 pm
Contact:

Re: Installing android studio on puppy linux.

Post by os62 »

I have gone back to just try and learn about using Studio, kotlin etc (because the world really needs another programming language!)

I have installed Android Studio on bookworm64, and managed to build very simple code, but frankly I struggle with it. It gets upset very easily, and it keeps demanding connection back to google - why cant we just download the compiler in one go?

I have tried different approaches, including the way given in "docs/README-android.md" in the SDL2 source download, see: https://github.com/libsdl-org/SDL

I copy sdl2 folder to project dir, from there type:

ANDROID_HOME="/root/Android/Sdk"

SDL2/build-scripts/androidbuild.sh/ com.me.sconnex sconnex.c sdlwio.c

It keeps asking me to set ANDROID_HOME to sdk path, which i already did.

Given that SDL is a clear well know popular cross-platform standard, there should be a simple, well documented step-by-step way to do this.

Ideas still welcome!

User avatar
Keef
Posts: 291
Joined: Tue Dec 03, 2019 8:05 pm
Has thanked: 3 times
Been thanked: 80 times

Re: Installing android studio on puppy linux.

Post by Keef »

Not entirely sure if it will work, but try

Code: Select all

export ANDROID_HOME="/root/Android/Sdk" 
os62
Posts: 12
Joined: Tue Jan 28, 2025 7:56 pm
Contact:

Re: Installing android studio, building SDL2 app..

Post by os62 »

Thank you, I forgot export. After a few retries, some progress. from the top:

I am using Bookworm64 puppy linux, with devx, SDL2 and Android Studio installed. (I believe you can just install the command line Android NDK/SDK which is much smaller). Now copy the whole sdl2 lib source folder to my project dir as a folder called SDL2, then I am building it with these commands (as a script):

Code: Select all

  export ANDROID_HOME="/root/Android/Sdk"
  export ANDROID_NDK_HOME="/mnt/sda3/android-studio/plugins/android-ndk"
  SDL2/build-scripts/androidbuild.sh com.apm.sconnex sconnex.c sdlwio.c 
 

I get the reply:
./gradlew installDebug

Now I understand, I need to connect phone in usb debugging mode (?). Maybe gradlew will fix that?
I connect the phone and type "./gradlew installDebug" from the "SDL2/build/projectname" folder. when i do that, i get:

"Error: JAVA_HOME is not set and no 'java' command is in your path. "

I try:

export JAVA_HOME="/mnt/sda3/android-studio/plugins/java"

first, but I still get an "invalid directory" error. any ideas?
EDIT:
so this enables usb debug mode:

https://www.lifewire.com/enable-usb-deb ... id-4690927

so now i try:
export JAVA_HOME="/mnt/sda3/android-studio/jbr/"
./gradlew installDebug

it runs! it downloads from gradle.org, but then
Exception in thread "main" and a long list of errors..

Post Reply

Return to “Users Help”