Tuesday, September 16, 2014

Error occurred during initialization of VM Could not reserve enough space

I got this error when I was trying to build a Gradle project

!ENTRY org.springsource.ide.eclipse.gradle.core 4 0 2014-09-16 18:26:42.625
!MESSAGE Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.11/userguide/gradle_daemon.html
Please read below process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 1048576KB object heap
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0


Solution:

In Eclipse Change the Gradle's JVM setting in Window/Preferences/Gradle/Arguments... on JVM Arguments section select "Use:" and write something like: -Xms128m -Xmx256m.

Friday, September 12, 2014

.gitignore not working

I had run into a problem where Git seems to not ignore files specified in .gitignore file.

It seems that files that git knows about, it can't ignore, e.g. files that are created at the project creation.

To solve this problems, run the following commands in order

git rm -r --cached .

git add .

git commit -m ".gitignore is now working"

Thursday, January 9, 2014

Install a high speed USB host controller

When connecting a USB 2.0 device, Windows displays the following message:

The thing is
I DO HAVE A USB 2.0 HOST CONTROLLER
and I used to enjoy high speed using my USB ports, until I did some hard disk resizing, which I believe have nothing to do with USB ports.

Anyway, to solve this:
  • Open the device manager. In Windows 7, right click on My computer -> Manage.
  • In the Device Manager, double-click on the "USB Root Hub", then uncheck "Allow the computer to turn off this device to save power" 
It gave me a better speed, but not quite as the one I used to have.

If I find a better solution, I will to update this.

Friday, January 3, 2014

error "No module named jinja2"

Building a google app on eclipse in python, I got this error.

First jinga2 comes bundled with Google App Engine for Python, so there's no need to go through the painful process of installing it on your machine.

To reference it from your project, add the following under the libraries section in your .yaml file

- name: jinja2
  version: latest


and import jinja2 in your code

Thursday, January 2, 2014

IOError: [Errno 13] file not accessible:

Trying to build a google app on eclipse using python, I got this error while trying to render an html file.

To solve it, put the folder that contains the html in the same folder that contains the yaml file.


Tuesday, December 31, 2013

Google App Engine Launcher - NameError: global name 'execfile' is not defined (Python)

When trying to run the helloworld example, it shows this error:

NameError: global name 'execfile' is not defined

This happens when you have multiple versions of python on your system. The App Engine sets its default to python 3 although it already searched and found python 2.7 on the system before installation!!

Anyway, to solve it, go to Edit -> Preferences and change Python Path to refer to Python 2.7

Sunday, December 22, 2013

Unable to execute dex: java.nio.BufferOverflowException.

When trying to run an android application from eclipse, I got this error

[2013-12-23 07:23:38 - Dex Loader] Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.
[2013-12-23 07:23:38 - Spinner] Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.

To solve it, right click on your project folder -> Android tools -> Add Support Library, and follow through the steps.

Edit: For some projects even this doesn't work and you have to set the target sdk to 19 (the latest as of the time of this post) in both the androidmanifest.xml and project.properties files.