Android Studio (Intellij Idea) - run/debug configuration - remembering which device to run on - intellij-idea

I guess this is a bit of a longshot, but with Eclipse, if you were using an Android emulator which was not the included one (for example, VirtualBox), you could select it the first time you ran your program, and tick a checkbox saying "Use this device for future launches". But the same option does not exist in Android Studio (Intellij Idea), meaning you have to choose the emulator every time you want to run the program.
I'm wondering if anyone knows of any way I can hack this so it will always run on a particular emulator which is not the built-in emulator. Can I put the emulator's ip address and port into a config file somewhere so the program will always launch on it without me having to click? I know it's a small thing but it's just convenience.

Sure it does, click the dropdown next to the run config, and press "Edit Configurations"
You can then select an Emulator, A Device, or to ask you when you run the app (like you have now).

The correct answer is to select USB device as the default. The program will then automatically run on the connected Virtualbox emulator. The answer was provided by sasha_trn in this comment

Related

Why do I need to keep re-enabled Accessibility for my mac whenever I compile a new version?

I have a macOS application that uses CGEventPostToPSN to send keyboard commands to TextEdit.
Whenever I compile a new version of the app, I'm unable to send keyboard commands.
I have to go into System Preferences -> Security -> Accessibility, then remove and re-add my application.
Every time I compile a new version.
Is there some way to circumvent this during development?
Yes, I worked on a project with this same problem. We never got around to doing it (disclaimer!), but our working theory was that if we enrolled in the Apple Developer Program and signed our development macOS builds with a Developer ID certificate, this problem will go away.
(The thinking was that it was probably Gatekeeper not being able to link one build to the next since there was no shared certificate for continuity.)
Note: This doesn't mean you have to distribute in the macOS App Store. You might look into notarization though.

How to edit and debug OAF java code in IntelliJ IDEA

I agree that JDeveloper provides some unique ADF-specific functionality, but when it comes to work with java code, IntelliJ IDEA works better for me. Can I move java-related operations to IDEA?
Setup
Create IDEA project from existing sources, setup source folders and connect libraries.
Setup IDEA run configuration. "Listen to remote JWM" means that IDEA will act as a server and Jdev will connect to it as soon as it starts running. It is good if you need to debug processRequest() method - debugger must be connected immediately. I chose "JDK 1.4.x" because it looks closer to VM parameters which Jdev uses when it starts debugging (you can look at those is Jdev log while debugging).
Setup Jdev as a client. Append VM options from IDEA to your existing options.
Running
To start debugging, first, run IDEA run configuration with green bug button, and second, run Jdev with green play button.

VS Code fails to automatically recognize AZ-3166 dev kit

According to the documentation,:
Start VS Code and then connect the DevKit to your computer. VS Code automatically finds the DevKit and opens an introduction page.
But this is not happening. No error is thrown, but nothing happens. I can hear a tone from the computer when the AZ-3166 is plugged-in. It shows up as a storage device on the PC. And the Arduino IDE is able to recognize it.
But VS Code ignores it and does not take me to the introductory page, so I am unable to complete the documented process of connecting to Azure.
I come across this issue as well.
You can resolve this manually by pressing F1 and typing in the command Arduino: Board Manager. From there look up MXChip - Microsoft Azure IoT Developer Kit and install the latest version. From there you should be able to proceed as normal.
Is there a workspace open? If so, try closing it (File > Close Workspace) then close VSCode, reopen and connect your device.
It works for me. Good luck.

Android Studio Freezes

I use Android Studio 0.8.6 for Android Development, and when I'm editing a file, it will freeze, and I have to restart computer to close it, since System Monitor (I am on Ubuntu 14.04 LTS) won't close it. It's always the same file I'm editing, this never happens with any other file. It shouldn't matter, but the name of the file is sun_vertex_shader.glsl. There's no error, or log output, or anything.
Here's exactly what happens - I'm typing in the file, the cursor freezes, stops blinking, and the mouse pointer is an I-beam, no matter where in the window I move it. The window doesn't close when I press the X, and when I restart my computer and open Android Studio again, I start editing the file and seconds later, it happens again.
I know you probably can't help me without any error logs, but I couldn't find any. If you know where I could find them, I will post them here.
I found out what is causing this: the GLSL plugin I downloaded from here is causing Studio to freeze, as I have read in the comments.
Please check your system Date/Time and correct it, this problem occurred if your system date does not match with current date.

Xcode builds on Debug but not on Release

So, I have this problem when trying to build my project.
Currently If I run the project in Debug mode, it runs fine, the app starts up on the device and I can test stuff.
However the weird part is when i switch over to the Release build and try to build on the device. When I press the Run button Xcode builds as normal and the build succeeded notification even pops up, but then I get this error code.
Lets call my app xxx
Could not launch "xxx.app"
No such file or directory:
/Users/*my Name*/Library/Developer/Xcode/DerivedData/*Bunch of xcode folders*/Products/Release-iphoneos/xxx.app/xxx
I went into finder and searched up xxx.app and couldn't find it. Furthermore there doesn't even exist a Library folder under /Users/my Name/.
So what is xcode trying to do here, and what should I do to fix this?
Edit: I have also tried Cleaning the project and building again, the error code still comes up.
I get this crap all the time.
What I do is clean the project, close it, shut down Xcode, start up Xcode, open project, then build and run.
If that still does not work then find the "DerivedData' folder Organizer->Projects and delete it, then do the above again and try again.
I tried creating a new scheme and setting it to Release mode. That worked for me. However, a reboot after closing xCode seems to work, too.
I went into finder and searched up xxx.app and couldn't find it. Furthermore there doesn't even exist a Library folder under /Users/my Name/.
It does exist, but it's hidden (since OSX Lion) in the Finder (because standard users -- as opposed to developers -- should not mess with it).
Some utilities (on a simple command line) can make it visible again but the simplest thing to do is to use "Go" menu of the Finder and select "Go to folder…" (Command-Shift-G). Then copy/paste the path you want to go to and validate.