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.

Monday, December 9, 2013

Eclipse - Failed to create the java virtual machine

Running eclipse for the first time, I encountered the problem
"Failed to create the java virtual machine"
and the program didn't run.

There are two place in eclipse.ini that includes
--launcher.XXMaxPermSize
512m
make it
--launcher.XXMaxPermSize
256m

You may need to make the numbers smaller than 256 though, 128 or something and it should work