Installing "AboutAndroid" to LG-P925g Phone

This section provides a tutorial example on how to install my 'AboutAndroid' application to my LG-P925g phone. 'HelloAndroid' needs to be uninstalled first, because both applications share the same Java package name 'com.herongyang'.

My first application "HelloAndroid" works on my LG-P925g phone, now let's see what will happen to my second application "AboutAndroid".

1. First, install the "AboutAndroid" debug package to my phone using the "adb -d install" command. See previous tutorials on how to build the debug package.

C:\herong\AboutAndroid>\local\android-sdk-windows\platform-tools\adb
   -d -s install bin\AboutAndroid-debug.apk
806 KB/s (23132 bytes in 0.028s)
        pkg: /data/local/tmp/AboutAndroid-debug.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
^C

What's wrong with the installation? This is the first time installing the "AboutAndroid" package on my phone. Why I am getting the "INSTALL_FAILED_ALREADY_EXISTS" error?

After checking "AndroidManifest.xml" files from both "HelloAndroid" and "AboutAndroid" applications, I notice that both applications are sharing the same Java class package name - package="com.herongyang". This means that I can not install both "HelloAndroid" and "AboutAndroid" applications on to the same Android phone.

When building any future applications, remember to give different Java package name for each application.

2. Uninstall "HelloAndroid", then install "AboutAndroid".

C:\herong\AboutAndroid>\local\android-sdk-windows\platform-tools\adb
   -d uninstall com.herongyang
Success
^C

C:\herong\cod\AboutAndroid>\local\android-sdk-windows\platform-tools\adb
   -d install -s bin\AboutAndroid-debug.apk
778 KB/s (23132 bytes in 0.029s)
        pkg: /sdcard/tmp/AboutAndroid-debug.apk
Success
^C

3. Go to the phone. Tap on "Home", "Applications", then "AboutAndroid" to run the application. You will see an error message on the screen:

Sorry!

The application AboutAndroid (process com.herongyang)
has stopped unexpectedly. Please try again.

[Force close]

What's wrong with my "AboutAndroid" application? It's a very simple application trying to display system information in a text view object.

See the next tutorial on how to resolve this error.

Table of Contents

 About This Book

 Installing JDK 1.8 on Windows System

 Installation of Android SDK R24 and Emulator

 Installing Apache Ant 1.9 on Windows System

 Developing First Android Application - HelloAndroid

 Android Application Package (APK) Files

 Android Debug Bridge (adb) Tool

 Android File Systems

 AboutAndroid - Application to Retrieve System Information

 android.app.Activity Class and Activity Lifecycle

 View Objects and Layout Resource Files

 Using "adb logcat" Command for Debugging

 Build Process and Package File Content

 Building Your Own Web Browser

 Android Command Line Shell

 Samsung Galaxy Tab 3 Mini Tablet

 USB Debugging Applications on Samsung Tablet

 Android Tablet - LG-V905R

 USB Debugging Applications on LG-V905R Tablet

 Android Phone - LG-P925g

USB Debugging Applications on LG-P925g Phone

 Installing LG USB Device Driver on Windows

 Viewing LG Android USB Device in Control Panel

 Turning on USB Debugging on LG-P925g

 Viewing USB Debugging Devices in Control Panel

 Running "adb" on LG-P925g USB Debugging Interface

 Installing Application to Phone using "ant installd" Command

 Installing Application to Phone using "adb -d install" Command

 "adb -d install" Command Options

Installing "AboutAndroid" to LG-P925g Phone

 Developing Applications with Android API Level 7

 Archived Tutorials

 References

 Full Version in PDF/EPUB