Need an IDE for Android NDK + SDK development [closed] - android

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
Since I've got issues with ndk development on eclipse (multiple errors when I open a .c file in the JNI so I cannot set any breakpoint without close and reopen the project after it) I was wondering if any of you has the knowledge of another IDE which would be more effective for an environment where I intent to use the NDK for calling a native library and the SDK for the rest (App gui, calls to lib, etc...)
Many thanks for your advices.

You can use Eclipse, NDK can be integrated there, there are some plug-ins that you can use to debug native code.

I'll recommend to use Android-Studio based on IntelliJ IDEA from jetBrains when there will be a v1 release, its UI is clear and effective and the debugger is less annoying than eclipse's one, however native development is a bit tricky unlike eclipse which provides the appropriated plugins when you write your module in C++ (if you do it in C, the compiler will take it as an error when you'll open your file in the IDE).
So I'll develop in native using eclipse until a native module exists for Android Studio.

How about keep using Eclipse on Linux with full features. Features for Java support and Native language support.

Did you try out Visual studio 2017+ ?
Remember, with Visual studio and C/C++, you can support windows, android, (may be IOs as well but not tried) from single code.
VS is light weight but powerful IDE.
I recommend VS2017.
at visualstudio.microsoft.com:
Write once target all
C++ is a great language for mobile app development
Migrate existing C++ libraries to target Android, iOS, and Windows platforms or use these C++ libraries to build complete Xamarin Android Native, Java Native Interface, >or iOS applications. You can also develop complete Android Native-Activity applications all within Visual Studio.
Article: Build an app for Android, iOS, and Windows (C++)
Article: Mobile Development with C++ | Windows UWP, Android and iOS
Video: Getting started with ndk and visual studio

Related

Android - How to build native library on Windows and use it in Android NDK [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
It appears that in order to use a native C library on Android, you need to have it compiled into .so and .a library files. How do you do that on Windows? It seems that it's only possible to compile .lib and .dll files. Does that mean you can't do Android development with the NDK on Windows?
Does that mean you can't do Android development with the NDK on Windows?
No, you can build Android apps with native C code on windows.
.so and .a files are compiled library formats used primarily by Linux based operating systems. Android uses Linux kernel. So it required the native libraries to be compiled to .so format for dynamic linking and to .a format for static linking.
So you need a cross compiler to compile a library into Linux compatible format in Windows. Also your normal Visual Studio compiler might only compile to X-64 machine code. In order for the library to be usable in all CPU architectures that Android supports (most Android devices have ARM CPUs), you need the library to be compiled to ARM instruction set machine codes.
You can set it up all by yourself using GNU-C compiler and CMake. But that's cumbersome.
Fortunately, Android NDK have everything set up for you. Everything you need is already provided and configured in Android NDK (Native Development Kit).
See developer guide for Android NDK here https://developer.android.com/ndk/guides/

Which is the easiest way to migrate a C++ application for Android and iOS?

I have a C++ application that uses Qt 4.8 and OpenCV 2.4.2. It is developped using Visual Studio. I have to migrate this application for Android and iOS.
Which is the plan to follow? I should make the minimal change to the existing code.
Unfortunately, there’s no easy answer to this. The fact that you’re using Qt is a great start, and using it as much as possible will go a long way towards making your code portable from Windows to other OSes.
I would look at upgrading first to Qt 5, as Qt introduced great support for both iOS and Android.
After that, the build chain is going to be your next obstacle. It looks like the Qt Visual Studio Add-in has an option to export a .pri file from the VC++ project, which would be a very handy starting point. Generate the .pri file and compare it to the project file created by QtCreator for an Android and iOS app, and try to copy the mobile-specific parts into your generated .pri file.
Other potential pitfalls are:
Visual C++ is a much more permissive compiler than gcc (Android) or Clang (iOS and Android)
Your app's dependencies must all be cross-platform as well. I’m sure OpenCV is, but it’s something to keep in mind
On iOS, all libraries must be linked statically

[ Native ]: Using Java functions & 3rd-party libraries in Qt for Android [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Recently I use qt to write a android app.
But I have a big question, can I use/call some native android APIS, such as call special activity?
e.g, In Android SDK I call contacts in java:
Intent intent = new Intent(Intent.ACTION_PICK,ContactsContract.Contacts.CONTENT_URI);
startActivityForResult(intent, PICK_CONTACT);
Is there a some c++ wrapper libraries for java android sdk APIs?
Or if I need a some special component (that has written with java), can I have it in my qt android program?
Or make a program with mixed pages/activities of "pure qt" and "standard java" or "C++ android NDK" ?
(I ask this question because I have a experience with MOSYNC framework, that was a good one but you have been limited to its own libraries, you couldn't use any external libraries or android standard APIs, ...)
Thanks in advance.
EDIT:
according to improvements in JNI (
http://qt-project.org/doc/qt-5/qtandroidextras-index.html), I have a question:
can I use 'any' android Java third-party libraries in my qt project? As I use those libraries in Java SDK projects?
In order to do what you want, you need to call Java code from your C++ code, through JNI. I don't know any C++ wrapper libraries for this. You will need to get the Java VM from JNI_OnLoad, and when you want to call a Java method you will need to attach the VM to your thread, with gives you a JNIEnv, which you can use to find the class you want and call methods on it. This link should help with the details.
As to whether it is worth it to use QT to develop Android applications, yes, if you need cross-platform support and want to deploy the same application to Android, Linux, Windows, etc. If you are only developing Android apps, then in my experience it is easier and faster to use Android directly.
I am not sure how you are proceeding with "Qt for Android". But at this point of time, this idea is officially supported by the KDE team (K Desktop Environment). They call it KDE Necessitas project. And they have released the first beta of this project on October 2012.
So basically when you install the Necessitas SDK, you probably get these things installed.
Qt Creator - The Qt IDE customized for Android.
Android NDK - For building the shared object out of the Qt code.
Android SDK - Customized with Qt support.
Using the customized Qt Creator, you can
Create an Android UI project.
Design the UI in integrated Qt Designer.
Compile the C++ code to build the .so file and wrap it with the Java code.
Create the APK and deploy.
Debug the APK.
One major concern I have with Qt for Android is regarding the UI. The UI have the native look and feel of KDE 4.x (The same which runs on desktops). The android UI themes (Holo etc.) are not fully available yet.
And since this project is still beta, I am not sure about the availability of wrapper classes/functions for the Android native features. Please go through the official documentation for more details.
Hope this helps.
You can program in C/C++ using the Android NDK. You'll have to wrap your c++ codebase in a static library and load that through a Java wrapper & JNI.
The standard NDK does not support RTTI and a lot of the functionality of standard c++ is also not available such as std::string, etc. To solve this you can recompile the NDK. Dmitry Moskalchuk supplies a modified version of the NDK that supports this at http://www.crystax.net/android/ndk-r3.php. This modified version works on all Android phones that run on an ARM processor.
Note:JNI calls can decrease your performance by a lot. Java isn't that hard tho -- if you know how to program in C/C++. The advantage of Java is that the application can run on any device running Android, where as NDK applications depend on the architecture it was compiled for.

Which IDE for Phonegap? Is Eclipse enough? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am about to jump into Phonegap and realize that it doesn't have an IDE of its own. I know that I could use Eclipse to create Android-centric Phonegap apps, but what about the iOS and perhaps Windows Phone and perhaps Blackberry "versions" - can Eclipse be used for all of it? What do most Phonegappers use as an IDE?
Does PhoneGap Build make it possible to do it all in Eclipse, and then throw it up to the cloud for the iOS, etc., builds?
I'm currently using intel-xdk and it's been great so far. It has the ripple emulator embedded which is great to test your app quickly.
Yes, Eclipse is more than enough to target all the platforms.
Using PhoneGap Build, you could write the entire app using any text editor - no IDE required - and upload to their service. Their service handles the compilation in all the target mobile environments for you, and then provides the final files to download for each platform.
From their FAQ:
How do I get started with PhoneGap Build?
Simply upload your web assets - a ZIP file of HTML, CSS and
JavaScript, or a single index.html file - to PhoneGap Build, point us
to your Git or SVN repository. Then we’ll undertake the compilation
and packaging for you. In minutes, you’ll receive the download URLs
for all mobile platforms.
For ease of development I'd recommend installing one of the IDEs (probably whatever matches the physical devices you have for testing or prefer). This way you get IDE assistance like Intellisense, but as I said it's not strictly required to have one.
Your alternative if you want to compile for all those platforms locally is pretty ridiculous:
iOS - install Xcode
Android/BlackBerry - install Eclipse
Windows Phone - install Visual Studio
Even if all you have is a web browser you could edit your code in its repository directly through GitHub.com's web interface, and then tell PhoneGap Build to clone the repo and build, then download the builds for each device.
It seems Visual Studio would be better for someone more familiar with that:
1) http://kencenerelli.wordpress.com/2012/08/10/extending-phonegap-for-visual-studio-to-android-devices/
Excerpt:
"PhoneGap:Build. The online service can take your HTML, CSS and JavaScript files (everything the PhoneGap templates create using Visual Studio) and compile them into apps that are ready for a vendor’s app marketplace."
2) http://anindita9.wordpress.com/tag/visual-studio-phonegap/
3) - you can use Visual Studio Lightswitch and Nomad, too:
https://www.facebook.com/vslightswitch/posts/658678164147712
https://groups.google.com/forum/#!topic/phonegap/_eNL6viCFhs
4) Also, tip on Android/Eclipse:
https://groups.google.com/forum/#!topic/phonegap/-wYLoYWwp-I
5) PhoneGap tutorials:
http://vsnomad.com/documentation/learning-phonegap.html
http://pieterderycke.wordpress.com/2012/03/26/developing-mobile-applications-with-phonegap-and-jquery-mobile/
6) PhoneGap/Cordova vs. Nomad:
http://brantleclercq.com/2012/12/15/vs-nomad-vs-phonegap-build/
UPDATE
But, for somebody more conversant/fluent with Eclipse, perhaps Aptana Studio, an open source IDE based on Eclipse but web-centric:
http://en.wikipedia.org/wiki/Aptana_Studio
I develop apps plus web-service backends (mostly in PHP). Some of my "apps" are designed to run as apps on phones/tablets and as Chrome plugins (or just webpages) on desktop/laptop systems.
I currently use JetBrains PHPStorm (buggy, and service isn't great, but it hassome cool IDE features and reasonably priced) and Eclipse together. In Eclipse, I have Aptana plus web tools platform, and of course the Android ADT plugins installed.
I've got another guy who does builds/plugins for iOS using a Mac/Xcode/etc.
We try to do as much debugging in browsers as we possibly can and just use the simulator/emulator (and devices) for testing plugins and other device-specific stuff.
We're just moving to PhoneGap 3 and are evaluating PhoneGap build as an alternative. (We're particularly interested in the debug capabilities. It's not clear how much they really add over what's already out there.)
It certainly sounds good on paper, but we'll have to see.
If you're doing plugin development, you'll need the appropriate system for development (PC or Mac) and testing.

Automating the Android build process [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I want a command line tool that works in the following situation:
1) A computer with JDK and Android SDK installed (with the target Android platform).
2) An Android project created using eclipse.
And give me the following output:
1) The signed APK of the given eclipse Android project.
How do I accomplish the above by writing a Java program (By kicking off Ant using the Java Runtime class)? I want to automate the build process, how do I do that?
Thanks.
I've used ant to do this and we use Jenkins for Continuous Integration. I've written a post on how to automate this.
http://www.multunus.com/2011/09/continuous-delivery-for-android-apps-part-1/
I use Maven with the Android plugin. It works well.
See http://simpligility.github.io/android-maven-plugin/.
The Android build process is fairly complex: quite a few tools are invoked one after another: javac to compile, then dx to convert to dex, then aapt to package (I'm sure missing a few). You can run Ant in debug mode to see the exact sequence (it is also documented, somewhere...).
So you can either:
Bundle the Ant jars with your app and invoke Ant programatically
Write a Java 'script' that invokes the tools in the correct order
Write a simple shell script/batch file and be done with it.
I am currently using Fastlane to automate beta and production releases. Fastlane is largely written in Ruby and you can customize releases based on your internal processes. You can watch this Droidcon '16 video to get started.

Categories

Resources