3 ms·
>Neither of which seem to be the focus of android studio. I think the decision is a layer below "Android Studio" -- or -- it depends on how you slice & dice wh
by jasode 8y ago
>Neither of which seem to be the focus of android studio.
I think the decision is a layer below "Android Studio" -- or -- it depends on how you slice & dice what Android Studio is.
If you look at the ancestor of Android Studio as being IntelliJ, Jetbrains (not Google) did make a version of that IDE (CLion) for C/C++ native.
However, if you look at the Android operating system philosophy, it seems like Google (Andy Rubin) decided that a Java-like (Dalvik) VM is the 1st class programming model with native C/C++ (NDK[1]) being 2nd class. The Android Studio being Java-focused is just a downstream side effect of that.
[1] https://developer.android.com/ndk/ https://developer.android.com/ndk/
- izacus 8y agoUm, Android Studio actually has the CLion C/C++ module intergrated for NDK. I think the author of the post is complaining about lack of JavaScript or similar support in the IDE :)
- jasode 8y ago>, Android Studio actually has the CLion C/C++ module intergrated for NDK. Right, but I was responding to gp's question about "focus" of the IDE and not just about the extended capabilities (plugins) for NDK. The "focus" of Android Studio is Java and example of that is when you click "New Project", you will get "MainActivity.java" as the starting file. You don't get "MainActivity.cpp". In the full Clion IDE (not the CLion plugin), the focus is C++ because the "New Project" auto-generated file is "main.cpp". >I think the author of the post is complaining about lack of JavaScript The gp used the phrase "neither of which" that seems to refer back to "two ways" and therefore it includes question about native C/C++ being a possible "focus" for Android Studio. I'm saying that whether Android Studio evolves to write "MainActivity.js" (Javascript React/Cordova) or "MainActivity.cpp" (C++ native) -- it is a philosophical decision outside of Android Studio. In other words, the Dalvik/Java VM as the foundation seems to dictate the programming tools' "focus". Maybe if Google makes a drastic change to Android and make the V8 engine the underlying runtime instead of Dalvik, the "focus" of Android Studio would then switch to "Javascript".
- pjmlp 8y agoAndroid is a Java based OS, the NDK is there to implement native methods just like we used to write inline Assembly on the good old days. Even what is called a native activity isn't really one, because what Google did was standardize a common pattern many were doing before as android.app.NativeActivity, with a bunch of native methods that the .so is expected to expose. And android.app.NativeActivity is pretty thin anyway, because it doesn't provide a good way to work with permissions or SAF from native code. Given that they locked down the NDK on Android 7, require JNI for like 80% of the APIs and Brillo was rebooted as Android Things, that says pretty much how they see the NDK for general use. Which is why most NDK users keep implementing their own versions of NativeActivity anyway.