Wednesday, November 23, 2011

Building Webkit with Qt 4.8 on Linux

To build recent webkit codebase for qt, qt 4.8 is required.Currently to pre-built binaries for qt 4.8 is available, so you have to build it manually.

The steps to build webkit with qt4.8 on linux (mine is ubuntu Natty version) are as follows:-
Step 1. Get the qt 4.8 source:-
Get the qt 4.8 source from here in tar.gz format.

Step 2. Uncompress it:-
Uncompress it by using the below commands:-
  1. gunzip qt-everywhere-opensource-src-%VERSION%.tar.gz
  2. tar xvf qt-everywhere-opensource-src-%VERSION%.tar
Step 3. Building the qt 4.8 library:-
Move to the qt source home folder and use following commands:-
  1. cd qt-everywhere-opensource-src-%VERSION%
  2. ./configure // Deafault confing can be used
  3. make // create the library
  4. make install // install the library
Step 4: Set the Environment Variables:-
  • export PATH=/usr/local/Trolltech/Qt-4.8.0/bin:$PATH
With this step qt library is set-up is complete.

Step 5. Now build the webkit library

Get the webkit source from www.webkit.org.
From the home folder (which contains the "Source", "Tools" folder etc) use the below command:-
  • export QTDIR="/usr/local/Trolltech/Qt-4.8.0" // Set the Qt Dir
  • ./Tools/Scripts/build-webkit --qt [--debug]
Step 5. Launch qtwebkit
Now to launch the webkit library use the below command:-
  • ./Tools/Scripts/run-launcher --qt [--debug]


Monday, August 15, 2011

Android SDK update issue: "Folder failed to be renamed or moved on SDK install"

Recently while i was updating my Android SDK, I faced some issues and I was not able to update the sdk.The AVD managr was displaying the below error message.

-= Warning ! =-
A folder failed to be renamed or moved. On Windows this typically means that a program is using that folder (for example Windows Explorer.) Please close all running programs that may be locking the directory.

So I did the next natural step for such cases i.e googling for the error and foud that this issue is faced by many people recently and the same issue is logged in code.google.com also.URL for the same is:-
http://code.google.com/p/android/issues/detail?id=4410#makechanges

In the above page different people has recomended different solutions for the above issue.I am listing down all the solutions below (and yes, the one which worked for me.)

1.Might be an issue with anti-virus.Disable it and try again.
(didn't work for me)
2.If no antivirus software running and still get the error message, try
to delete the temp folder itself and run the update again. Worked for some people.
(didn't work for me)
3. Check if "adb.exe" is running as an independent process (normally when an android device is plugged-in).Unplugged the device and try. (not my case as no device was plugged-in)
4. Make a copy of the tools folder itself (keeping it at the same directory tree level, thus "tools" and "tools-copy" were both in the "android-sdk-windows" folder).
- Run Android.bat from that copy folder.
- Closed the SDK and , delete the folder (kill the adb.exe process first as you can't delete the folder without doing that).
- Restar the SDK from the normal (now-updated) tools folder.
(didn't try this option because of it's complexity...should have been the last one to try)
5. In the "temp" present inside "Android-Sdk-Windows" folder you can find the "tools_r12-windows.zip" or other files which you will update.
-Unzip it and copy all the files in the file the "tools" folder.
(This one works for me)

There are some other solutions mentioned also I didn't look at them as my problem was solved by that time and couldn't wait more to explore android 3.2 version.

Tuesday, April 19, 2011

Building chrome for Ubuntu linux...Some common errors

The steps for building Chrome for different platform is well documented by google.But while building Chrome I encountered some errors which are less documented.These are mostly due to missing linux package.Below are some of the issues due to missing package and the respective package required.

1. error: ‘XTestQueryExtension’ was not declared in this scope
Package Required:-
1. libxt-dev
2. libxtst-dev

2.libcommon.so: cannot open shared object file: No such file or directory
This is not exactly a compilation error.But this error comes while executing the chrome, if chrome is built using shared library option.To solve the error you need to add the path of the concerned library to system path i.e.

export LD_LIBRARY_PATH=/CHROME-PATH/src/out/Debug:/CHROME-PATH/src/out/Debug/lib.target:$LD_LIBRARY_PATH

where "CHROME-PATH" is the path of chrome source.

Tuesday, January 25, 2011

My First Android Application

As mentioned in my last post, I have started learning Android.After studying for one week and learning the basic stuff I have just completed my first Android Application.Being a avid cricket fan, it was just fitting that my first application was "World Cup 2011 Schedule".I had completed the coding and testing is done on simulator as I don't have any Android powered device currently.

Feature:-
With the application user can get all the information regarding:-
1.Match Schedule
  • Schedule All Matches
  • Schedule By Date
  • Schedule By Team
  • Schedule By Venue
2.Results
3.Points Table
4.Venue/Stadium Information
5.Weather Information

Below is some screenshot of my app:-



Sunday, January 16, 2011

Failed to install HelloAndroid.apk on device - Android error

Today I started learning Android programming.To start with I downloaded the android sdk from the android developer site and followed the instruction there to install (http://developer.android.com/sdk/index.html).Once done I followed the next instruction to run the first program, yes the "Hello World" program.For this I followed the steps provided at "http://developer.android.com/resources/tutorials/hello-world.html".

But while running I faced with below error message:-

HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554!
HelloAndroid] (null)
HelloAndroid] Launch canceled!

I searched for the error message but didn't found any satisfactory solution.I tried several options.Then after some time I found the solution (a simple one).The solution to the above problem is:-
Set the path environment variable with the path of "platform-tools" and "tools" found in the
"sdk-home".

That's it.Now restart eclipse and execute the program.