I just installed Android Studio 3.6.3 on Windows 10 and I created a new Native C++ project. I can build and run the native project and I can debug Java code in the project.
The problems I'm having are:
I can't step into the C++ code when debugging
I can't set breakpoints in *.cpp files.
When I right click folders in the project view to add a new file, I only see options to add Java, Kotlin, and Android platform files. There aren't any options to add C++ source or header files.
When I open a C++ file Android Studio recommends installing plugins supporting *.cpp. The plugin it's recommending is for Arma 3 plugin development.
The "Attach Debugger To Process" menu only has Java as a debugger option. That list should also contain Native, Dual, and Auto.
I've made sure to install CMake and NDK (Side By Side) in the SDK Manager and I've configured the NDK in the project settings. I've tried reinstalling Android Studio 3.6.3 and I've also downloaded Android Studio 4.0 RC 1, but I have the same problems.
What steps am I missing to get C++ support in Android Studio?
Managed to get it working. Turns out just running the uninstaller wasn't enough, I had to follow the steps in this answer to completely uninstall Android Studio. I then reinstalled and everything seems to be good.
Related
I cant seem to get flutter based documentation on android studio when i select quick documentation (control Q)
I have tried reinstalling android studio and have tried re-applying the documentation in the SDK manager.
I expect there to be some documentation of what methods are in the class
Try installing this Extention
Install Android Studio
Android Studio offers a complete, integrated IDE experience for Flutter.
Android Studio, version 3.0 or later
Alternatively, you can also use IntelliJ:
IntelliJ IDEA Community, version 2017.1 or later
IntelliJ IDEA Ultimate, version 2017.1 or later
Install the Flutter and Dart plugins
To install these:
Start Android Studio.
Open plugin preferences (Preferences > Plugins on macOS, File >
Settings > Plugins on Windows & Linux).
Select Browse repositories, select the Flutter plugin and click
Install.
Click Yes when prompted to install the Dart plugin.
Click Restart when prompted. Ne
It possible automate import Eclipse Android Project (generated by Unity 5.4.3) into Android project with command line using android sdk?
For some reasons (eg methods limit and others) i need build android project with gradle. But Unity 5.4.3 not supported build with gradle and i can't update it for new version because i have some problems with convert my unity project to the new 5.5-5.6 versions.
According to the Android Studio official document, there seems no way to import an Eclipse Android Project into Android Studio using command line (bat or sh). I know that Unity 5.5 and 5.6 are not quite stable yet, but it's still your best bet to upgrade.
What is the proper way to open cocos2d-x-3.7 in Android Studio?
I tried:
Open existing project in Android Studio project > Choose proj.android-studio directory (In another attempt, I also tried to choose the base directory MyGame)
Run
Error: couldn't find "libcocos2dcpp.so.
Moreover, it also does Classes directory in the Project.
Android Studio is only partially supported in cocos2d-x 3.7 and 3.8. With the default project you will only be able to run your app without debugging using Android Studio.
Prior to running your app in Android Studio you will have to compile using the Android Studio flag:
cocos compile -p android --android-studio
You will have to run this command after any changes to your app are made, since the default Android Studio currently doesn't compile your project.
Furthermore the default Android Studio project does not include the Classes directory.
Suggestion: Use Eclipse or Xcode to develop your cocos2d-x projects for now. Hopefully future versions of cocos2d-x will have better support for Android Studio out of the box, this is critical considering Google is dropping support for Eclipse.
When you try to run the application on Android Studio, you get the error couldn't find "libcocos2dcpp.so" because it doesn't have the NDK for building your game.
I recommend you to compile proj.android and import that, cocos2d-x 3.7 doesn't support full Android Studio yet. Do this:
cocos compile -p android
Then import your proj.android to Android Studio.
Now you can run your application but you won't able to debug it, bad news (it will just install the APK on your device or virtual device).
Hope it helps.
Error: couldn't find "libcocos2dcpp.so.
For this you need to compile android studio project first so .so files and classes folder will be generated.
Open your command line and enter the following command to compile your android studio project:
cocos compile -p android --android-studio --ap android-24 --app-abi x86
This will create required files in your proj.android-studio directory.
Now import this project into Android Studio and try to run it.
I am trying to build an Android Java app using Android Studio 1.0.1. However, my app uses some C++ code that I build using the NDK as controlled by Android.mk and Application.mk files. But Android Studio tries its own build and gets it wrong as it is not using my *.mk files. I know there have been some answers how to do this for previous versions of Android Studio but they evidently do not work for 1.0.1.
So how do I disable Android NDK builds in Android Studio 1.0.1?
Just add the sourceSets.main.jni.srcDirs = [] to 'android' section of your build.gradle. This will disable automatic call of ndk-build with auto-generated Android.mk.
And yes, this line should be added to the project-specific gradle file.
I'm using Android Annotations in my project and I followed the instructions in this blog post http://www.jayway.com/2014/02/21/androidannotations-setup-in-android-studio/
Everything worked fine.
Today I updated Android Studio to latest version (build of 5th june). This requires an update of gradle build tools from 19.0.3 to 19.1.0. And i configured this in my build.gradle.
Annotaion processing still works. The generated files are located in build/source/apt. But this folder isn't visible any more in project explorer. And starting the build complains about the configuration.
But the project seems to run correctly.
This behavior is very annoying. Do I have to change anything in Android Studio? Has anyone a solution or is this just a bug in Android Studio?
The author of android-apt has already updated his plugin to support Gradle's new version, just change this line in your build.gradle
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2+'
To
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.3'
The Android Studio Team changed the behavior of the IDE "for better IDE integration". Therefore the output directory of the apt-plugin v 1.2 will not be recognized as generated sources folder any more.
the plugin author knows about it and will provide a fix
https://bitbucket.org/hvisser/android-apt/issue/13/compatibility-with-011-android-plugin