A
A
amimamoya2021-04-06 18:49:07
Java
amimamoya, 2021-04-06 18:49:07

What to use to write an android application in Java?

Hello, maybe I'm asking an extremely stupid question, but help me figure it out. Here's the thing: I wrote a simple application in IntelliJ IDEA, went to Android studio to build the apk, but swing doesn't want to be imported there. I searched the Internet and found out that swing for android applications cannot be used, because. android has its own mechanisms for this. But doesn't this contradict the phrase "write once - work on all platforms"? Is it still possible to use swing for android applications? If not, then what to use for this? I also do not quite understand how to build apk or exe at all, can I have instructions for the "especially gifted"? As for the latter, in IntelliJ IDEA I was able to build a .jar, but how to make an .exe?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Shitskov, 2021-04-06
@amimamoya

Nothing is clear at all! Android development - in Android Studio (most often), but not in IntelliJ IDEA.
Under Android, you can develop in Java, but the code will not be executed by the JVM, so it’s not clear why “I wrote it once - it works on all platforms”

Is it still possible to use swing for android applications?

Not
If not, then what to use for this?

Android SDK
I managed to build .jar, but how to make exactly .exe?

The question is definitely still about Android?
I also do not quite understand how to collect apk at all

java-online.ru/android-apk.xhtml

O
Orkhan, 2021-04-06
Hasanly @azerphoenix

Here's the thing: I wrote a simple application in IntelliJ IDEA, went to Android studio to build the apk, but swing doesn't want to be imported there.

You may or may not be logged into Android Studio. You can build apk in IDEA too. Another thing is that you are trying to cross a snake with a hedgehog, trying to use swing in android.
In theory, of course, you can run swing on android, the question is, is it necessary to dodge like that. Definitely not. Well, if it's a matter of principle, then here's the solution
As for the latter, in IntelliJ IDEA I was able to build a .jar, but how to make an .exe?

launch4j.sourceforge.net

D
Deiwan, 2021-04-06
@Deiwan

I heard that activity is used instead of swing in android, and something needs to be written in it with xml, but this is inaccurate.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question