Friday, July 27, 2012

Android Device Debugging Problem :: Device unknown in Eclipse

Android emulators are great to test the apps. However, the apps are run in real devices. The test should be performed in real device before releasing it.

If you are using Eclipse IDE, and have problem debugging (running) the apps directly in Android Phones with the device unknown ( ???? ) problem, then follow the below process to solve the problem.

Note :: I'm assuming you are running eclipse in Linux Ubuntu distro.

1. Create a file 51-android.rules in /etc/udev/rules.d/ directory. (If this file is not existed.)
       sudo vim /etc/udev/rules.d/51-android.rules


2. Insert the below line in this file.
      SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
      
3. Then execute
      chmod a+r /etc/udev/rules.d/51-android.rules


4. You may require to restart the eclipse (if still problem persists). Then you will have your real device ready to debug from eclipse. 


At step 2. Please note ATTR{idVendor}=="04e8".
idVendor value should be the USB Vendor ID of the Android Phone you are using to debug the apps.
In my case, I was using Samsung S II and it's USB vendor id is "04e8". You can accordingly edit the usb vendor id appropriate for your phone.

For the complete list of USB vendor ID's of Company, you can click the following link.

http://developer.android.com/tools/device.html#setting-up

Thank you.





Monday, March 12, 2012

Basic Commands for SVN

1. Creating a directory in Repo
For eg :: To create directory MobileApps, follow the following command.
svn mkdir http://xxx.xxx.xxx.xxx/svn/source/MobileApps -m "Adding Main Project Directory"

2. Importing project in SVN
svn import MyProject http://xxx.xxx.xxx.xx/svn/source/MobileApps -m "Adding Main Project Directory"
This command will import all the files within MyProject to MobileApps folder.

3. Deleting a directory in Repo
For eg :: To remove directory mobileapps-java, follow the following command.
svn delete http://xxx.xxx.xxx.xxx/svn/source/MobileApps/mobileapps-java -m "Deleting ..."

4. Creating a branch from trunk
svn copy http://xxx.xxx.xxx.xxx/svn/source/trunk/mobileapps-java/ http://xxx.xxx.xxx.xxx/svn/source/branches/mobileapps-java-mybranch/ -m "Creating branch for java apps"

Thursday, August 11, 2011

Install Awesome Window Manager (WM) in Ubuntu 10.10

Ubuntu 10.10 uses Gnome Desktop Environment (DE) version 2.32.0. We can also use Awesome Window Manager (WM) on it. To install awesome ..
1. Type :: sudo apt-get install awesome3

After successful Installation you have to make following changes using terminal
gconftool-2 --type bool --set /apps/nautilus/preferences/show_desktop    False
# Disable buggy Nautilus desktop thing
gconftool-2 --type string --set /desktop/gnome/applications/window_manager/current    /usr/bin/awesome
# Set awesome as your WM of choice

-If you cannot locate /usr/share/applications/awesome.desktop then add ~/.local/share/applications/awesome.desktop

2. In awesome.desktop file enter the following information
[Desktop Entry]
Version=1.0
Type=Application
Name=Awesome
Comment=The awesome launcher!
TryExec=awesome
Exec=awesome

Then restart your computer. It's done now.

While logging in the window .. Please choose awesome from panel below.

Then Awesome Window Manager is shown. Then you can explore Awesome WM :)






Wednesday, July 6, 2011

"Application is not installed on your phone " Problem while launching android app

Problem :: While launching the android app in emulator, when clicking the app icon to run the application in emulator, I couldnot run the app. The pop up comes stating "Application is not installed on your phone".

Cause :: This problem occurs if u have the duplicate Activity in the App Manifest file. For eg. The SplashScreenActivity has duplicate entry in Manifest file.

Solution :: Make sure u have declared single Activity class in Manifest file.

:)

Wednesday, March 16, 2011

Add external jar while building with ant tool

Just add binaryLibraries in <build> tag with jars separated by ; symbol.

Tuesday, February 15, 2011

Obfuscation problem while deploying J2mePolish App Jar in Web Application

To decrease the size of mobile application in J2ME Polish, it uses obfuscator(Proguard). It renames all the generated classes in it's own way. While deploying the same jar in web application, we cannot use the class name of app.

Eg. We use UseDTO class in J2ME Polish, then it is renamed as aa.class by Proguard.

To overcome the solution, use 'keep' option of obfuscator in build.xml file of J2ME Polish app.

<obfuscator name="Proguard" unless="test">
    <keep class="com.abc.UseDTO">
</obfuscator>


What the above statement does is obfuscate all the class except UserDTO.

Now you can use UserDTO class in web application or any other project.

Thanks

Thursday, December 2, 2010

Tomcat Start Problem After Successful Installation in Windows

After installing Tomcat Server in Windows, Tomcat couldnot be restarted. In it's log file, following error is logged.

[2010-12-03 12:17:20] [986 prunsrv.c] [error] Failed creating java C:\Program Files\Java\jre1.6.0\bin\client\jvm.dll

.................





Solution :: Just copy msvcr71.dll file located in c:\Programs Files\Java\jdk1.6.0\bin to C:\Windows\system32 folder.

Now try to start Tomcat Server. Your problem should be solved now.