Ask coding questions

← Back to all posts
Compile code inside an Android application
Jaax (1)

Hello

I want to know if there's a way to compile code into an android app.

I'm building an app which is going to show a piece of code, but I'd want this code to be compiled and show the result.

I don't know if with repl I might do it, otherwise, how could this be done?

Commentshotnewtop
Coder100 (10815)

Hi! You can't do this on repl.it (way too resource-intensive, also you won't even be able to test it on repl.it), however, you can try android studio and react native

Note: I have not made such apps before since I do not have a phone.

EpicGamer007 (758)

@Coder100, @Jaax , There is support for Kotlin and Swing on repl. Though I think you can only create Console applications.. I have not experimented with it.

Coder100 (10815)

yeah, only console applications. @AbhayBhat

Coder100 (10815)

they really can't host such apps, for example: how will they have an emulator of a phone? @AbhayBhat

JosephSanthosh (1194)

How do you not have a phone and be such a pro coder. *Mouth drops dramitically . @Coder100

Coder100 (10815)

haha sorry I just don't :(
Parents won't let me :( @JosephSanthosh

EpicGamer007 (758)

@Coder100, same, my parents wont let me either... But yeah, an emulator would be extremely hard to maintain and would be slow. But I have an idea, there is this online java compiler which converts java bytecode to js bytecode, maybe they can do something like this with kotlin or swift