I have a libGDX project(which is also desktop compatible) and would like to export its desktop application to a JAR file, to run it like a standalone application. How can I do this with use of Android Studio?
Your LibGDX projects are still gradle-based, whatever IDE you are using.
Thus you can use Gradle on the Commandline to package your application.
For desktop you do this via gradlew desktop:dist. After that the resulting runnable jar file will be in desktop/build/libs/.
Related
If we use gradle clean build, it will create a daemon. On the other hand, if we clean or build through Android studio, it also generates another daemon.
So, How can we make daemons compatible?
Actually, there are two main reasons to be incompatible.
One is version mismatch of Gradle and Java. Gradle version may be
same but JDK versions are different.
By default, Android Studio is using embedded JDK, which most likely
has a different version from Java installed in our machine.
How can we make daemon compatible?
If we use the local java in Android Studio instead of embedded JDK, this issue will be solved.
Procedure:
In Android Studio, go to Project Structure -> SDK location.
Uncheck “Use embedded JDK” and
specify your local JDK.
Pictorial View is given below:
First Part:
Second Part:
I am trying to understand on how to build a shell component native code on Android with MFP 7.1 using Android Studio instead of ADT.
I got the MyProject/components/ShellComponent/android/native folder created after build the component, but there is no option to Run As > Android Studio project. I wanted to add Java classes to run under src. The ADT version uses a separate project tree, but with Android Studio, there is no separate tree.
I also tried to open native folder as an Android Studio project and it shows an empty project.
I ran the ShellDevelopment sample on Android Studio and it works fine.
Open the project in Eclipse -> Right Click on Android environment -> Run As -> Android Studio Project. When Android Studio is opened DON'T MIGRATE PROJECT TO GRADLE!
Anyway it is not recommended! if you want to make changes - use Eclipse to make these changes.
In my particular case, I implemented a cross platform project in C++11 that uses CMake. I initially designed this project to work on PC (Windows, Unix), but now I realized that I can use it on mobile platforms too, without re-implementing the business logic on every platform. The project uses standard libraries: Boost, Poco, OpenSSL, Protobuf.
After a few searches I came to conclusion that this is not even an usual mode to put together native and managed code in Android.
Is it possible to add reference in a Gradle project in Android Studio to a native project that uses CMake?
Can NDK adopt the project in a simple manner if I compile everything in command line (assuming I don't use Android Studio)?
If it is possible, is it recommended at all?
Is it possible to add reference in a Gradle project in Android Studio to a native project that uses CMake?
Since Google announced Android Studio 2.2 that comes with cmake plugin, so it's possible to reference CMake project to android project.
Can NDK adopt the project in a simple manner if I compile everything in command line (assuming I don't use Android Studio)?
In my experience, i compile NDK in separate way and then link the static/shared library (.so file) to be used in android project. I used NDK while developing PDF Reader using mupdf here
Hope this helps.
it would be possible with android studio 2.2, mainly the android plugin for gradle makes it possible. you could look at some examples in:
https://github.com/googlesamples/android-ndk/tree/master-cmake
android studio directly reads-in your cmake scripts -- there is nothing like desktop systems that generate project files for their native IDEs ( Visual Studio or XCode ); so you might have to modify your existing cmake files to eventually make it to work for android studio.
as long as you build to the correct APK, command line or IDE does not matter too much. If you intend to ship source code, having your project ready with an IDE would be attractive.
Please see CMaker_Boost, build the Boost with the CMake at a configure time. Now it is tested on the Linux and Android, gcc and clang. This can be included to the gradle project in the Android Studio. I hope this helps.
I'am insatlled RoboVM module. introduced a license key.
How to create RoboVM iOS APP in Android Studio?
Make sure you have Gradle installed in your Android Studio.
Start libgdx setup GUI tool
java -jar ~/Downloads/libGDX/1.6.1/gdx-setup.jar
Make sure to select IOS project.
Click generate
When it finishes, import libgdx project into your workspace (File->Import->Gradle)
Connect your device to your machine (if you don't want to use simulator)
Right click on the IOS project and select Run As IOS Device Application (or IPhone/IPad Simulator Application. Whichever suits you).
Hi I am developing application in android . But I am new to develop J2ME Application .I have a doubt that where will be emulator available to run the application .I mean that where can i download the emulator and where can i install .Pls Help me
To build an application in android you do not require J2ME but Android SDK.
You have to download WTK and install it. Then you can set up WTK Emulator as external tool in Eclipse to run your application. But there is a version of Eclipse for mobile application development: Eclipse Pulsar. It will much easier to use Pulasr instead of setting usual version of Eclipse.