Android Emulator: Enable keyboard input

Testing android apps with the emulator and not being able to use the normal keyboard to enter text is very annoying and not really efficient. Unfortunately the default device (ATM: Nexus 5) has keyboard input disabled. Enabling it is very easy:

  1. Go to your user’s home directory and search for a folder .android
  2. Open the folder and navigate to the folder avd. You will find one folder for each installed device. Open the folder of the device you are using.
  3. Find the file config.ini and open it in your favourite text editor.
  4. Search for a line starting with hw.keyboard. Change its value to yes. If the line is not present, add the line hw.keyboard=yes

Done. Start the emulator and you will see that the text input is working.

Gulp build fails with: Error: Broken @import declaration of “”

I am currently working on a project that involves an Angular.js frontend and the build server running on a machine behind a corporate proxy. From time to time this error occurs:

Error: Broken @import declaration of “

All the other tasks such as bower install work fine because we set the proxy for bower, npm and git. After some research it became clear that the clean-css dependency that is used by gulp-minify-css  is the problem. This plugin ignores the proxy settings and tries to resolve the import declaration directly. Solution is very easy: just set a HTTP_PROXY environment variable with your proxy and everything works just fine.

This issue here describes some more possibilities to get around this problem.

The server factory could not be located for the given input: Microsoft.Owin.Host.HttpListener

Recently, I was cleaning up an existing Selfhost Owin Asp.NET Web Api project. After removing some seemingly unused references the project crashed when starting the api.

Exception was this:

The server factory could not be located for the given input: Microsoft.Owin.Host.HttpListener

The solution was quite simple: I removed the NuGet package that contains the HttpListener because there is no direct reference to it but Owin still needs the package to start. So just add the NuGet package: Microsoft.Owin.Host.HttpListener again and everything works as before.