Tuesday, July 10, 2012

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.

Solution for this type of error in the android SDK installation and upgradation of tools .

Here we instead of runing installtion from eclipse we need to it from outside from command promt.




Steps:

1.Close Eclipse and close all instances of windows explorer in which the android application is running .

2.open the tools folder in android-sdk folder  Eg:  "D:\android\android-sdk\tools"

3.Now run AVD manager independently from command promt  with the following commands


4.  Go to the directory where android sdk is installed at, and then its tools subdirectory.
  • Run Android.bat.
  • At this point, update just as you would if you were running the AVD Manager from within Eclipse (make sure the proxy settings are mentioned if you are behind the proxy).

5.Install all the packages you want and enjoy your work ..............Now it will work fine .



Saturday, March 31, 2012

Setting up Google Maps in Android development.


First to generate the google maps we need to have googleAPI's jar .
next the main.xml file will be like this

 <com.google.android.maps.MapView
        android:id="@+id/mapView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:enabled="true"
        android:clickable="true"
        android:apiKey="07U1v4ybO9ld4IUYE6s1mzC867e9U9xLOm3lDDw"
        />



here ApiKey is genereted from the google maps site   http://code.google.com/android/add-ons/google-apis/mapkey.html

 Before that you need to generated the MD5 finger print .

This can be generated like this

Go to your WindowsPreference --->Android --->Build --->Copy the path from Default Debug keystore
It is looks like C:\Users\Maazeed\.android\debug.keystore .
Now in commad prompt we need to run the below following lines.
To get MD5 Finger print send the path of debug keystore.


keytool.exe -list -alias androiddebugkey -keystore "C:\Users\Maazeed\.android\debug.keystore" -storepass android -keypass android 






Now you get the MD5 Finger print  similarly like this

MD5 Finger print :
5F:52:33:3A:CF:66:F0:C5:2B:9A:6F:BE:EF:2B:A5:DF

Here we go we need copy and paste the sequence in this link
http://code.google.com/android/add-ons/google-apis/mapkey.html

Now you will generate the ApiKey .That looks like this .

Key generated :
07U1v4ybO9ld4IUYE6s1mzC867e9U9xLOm3lDDw

This is the APIkey you seen in first para of the discussion.

Now you can play what ever you want with the code.









/AndroidRuntime(673): java.lang.RuntimeException: Unable to instantiate activity/java.lang.ClassNotFoundException/oader dalvik.system.PathClass

I found this problem in android development because when we not include library files properly in manifest.xml.

java.lang.ClassNotFoundException


 java.lang.RuntimeException: Unable to instantiate activity

we need to set the library tag at proper place in the manifest file.
we can solve this problem by setting the <uses-library> under the application tag.

see the example below if we place the <uses-library> tag out of <application> then it causes error i stated above.


Example: The example works fine .

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.zen.mobile"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="8" />
    <uses-permission android:name="android.permission.INTERNET" />
  
   
     <application android:icon="@drawable/myapp_1" android:name=".AppointmentApplication" android:label="@string/app_name">
         <uses-library android:name="com.google.android.maps"/>
        <activity android:name=".WelcomeScreen" android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".AddCourse" android:label="@string/app_name" />
        <activity android:name=".RemoveCourse" android:label="@string/app_name" />
        <activity android:name=".ViewCourseMap" android:label="@string/app_name" />
    </application>
</manifest>


if you cause error even doing like this than make some inter change of <uses-library> at different ways.

Thursday, October 20, 2011

Android HoneyComb emulator facing performance issues


I have observed the Android 3.0 Honeycomb emulator is very slow compare to the other version of emulator like mobile .Google have agreed that it has some performance related issues in it .As of for temporary purpose i have minimized the slowness.

Things i followed to improve the android 3.0 Honeycomb emulator performance.

1.Increase the RAM Size of your system to more than 2 GB and 1GB in emulator .
2.Increase SD card size .
3.Add  property in AndroidManifest.xml as android:hardwareAccelerated="true".
4.Clear the temporary files every day before you  start eclipse and Emulator.Because it creates a lot of files in temp and  occupies lot of memory in C drive .

I hope it will solve the problem some extend.................:)

Users Features of Android 4.0

Simple, beautiful, beyond smart

Android 4.0 builds on the things people love most about Android — easy multitasking, rich notifications, customizable home screens, resizable widgets, and deep interactivity — and adds powerful new ways of communicating and sharing.

Check more on this here Android 4.0 for Users

New Developer Features of Android 4.0 Version


Android 4.0 brings a unified UI framework that lets developers create elegant, innovative apps for phones, tablets, and more. It includes all of the familiar Android 3.x interface elements and APIs — fragments, content loaders, Action Bar, rich notifications, resizable home screen widgets, and more — as well as new elements and APIs.
For developers, the unified UI framework in Android 4.0 means new UI tools, consistent design practices, simplified code and resources, and streamlined development across the range of Android-powered devices.


Check the features here Android Android 4.0 Developer Features

Officially Unveiled Android 4.0 ice cream sandwich


Google and Samsung together unveiled the New Android 4.0 and level 13 which is very impressive and advanced compare to older version. It is completely mobile supported version. 


It has many new stunning features .

Simple, beautiful, beyond smart

Android 4.0 builds on the things people love most about Android — easy multitasking, rich notifications, customizable home screens, resizable widgets, and deep interactivity — and adds powerful new ways of communicating and sharing.

It Has Refined, evolved UI.
 You can read more on this here Android 4.0 User Guide