Wednesday, May 24, 2017

Problems when trying to setup Android Studio on Ubuntu


Had 2 problems

first


Unable to run mksdcard SDK tool.

solved by

sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6

Second, while trying to launch emulator from within Android Studio

libGL error: unable to load driver: i965_dri.solibGL error: driver pointer missinglibGL

solved by

either run this command from the terminal


LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libstdc++.so.6' /Android/Sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5_API_24

or, set the ennvironment variable
ANDROID_EMULATOR_USE_SYSTEM_LIBS to 1

in ~/.pam_environment


and re-login

Monday, December 26, 2016

Installing nodejs from the command line on linux

sudo apt-get install nodejs

doesn't install the latest version


sudo curl -sL https://deb.nodesource.com/setup_7.x |sudo bash -

sudo apt-get install -y nodejs

Friday, December 23, 2016

Updating existing software on linux from command line

These commands will upgrade all existing software packages on linux and remove any no longer used packages/dependencies

sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get dist-upgrade
sudo apt-get autoclean
sudo apt-get autoremove 

Monday, December 19, 2016

Using new formatted paritions on linux

When setup linux on my system, I created several new partitions other than home
Once I finished installation, I found out I could only view these partitions, but not copy to them or remove from them

The reason is because these partitions were formatted by a filesystem owned exclusively by root

To change that, change the owner of the partition

mount /dev/sda4 /mnt/
chown -R khaled:khaled /mnt/
umount /dev/sda4

Sunday, December 28, 2014

Google App Engine rollback

Unable to update app: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=xxxxx&version=1&
409 Conflict
Another transaction by user xxxxxx is already in progress for app: 
xxxxx, version: 1. That user can undo the transaction with "appcfg rollback".


If you get this error which is usually due to a previously interrupted deployment process
  1. Navigate to your app engine sdk folder and then the bin folder.
  2. Execute the command appcfg.sh rollback "Your application Path/war/WEB-INF"
  3. You will need to supply your google email and password and this is the tricky part. If your login information is rejected, you need to go to your google account security settings and "enable for less secure apps", and try again.

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"