Quantcast
Channel: CodesMeshCodesMesh
Viewing all articles
Browse latest Browse all 21

Beyond Hello World In Android Part 2

$
0
0

In Part 1, you were able to learn how to send your app on real device , but some people complained me that they failed to send  app on their phone.In this article you explore the problem and find the solution and learn something more about android . Here are some possible problems and their solution to send app on real phone.

1) USB Driver not installed properly:

First of all check either your device is detectable or not. For this look at “Devices” window in eclipse and check  the either your phone name is showing there or not , if not its mean your USB drivers are not installed properly so install it again. As shown

device

 

2) Project Configuration is not compatible:

If your phone are showing in devices window but still you can not able to run your project on phone than may be the basic reason is project minimum version incompatibility with your android device.When build new project application , make sure that your phone version must match with your “Minimum required SDK’, that you have mentioned earlier during configuration project. Through the way shown below you can check either your  phone version match with your “Minimum required SDK ” or not.

Right click on your project and select Run > Run as android application.Following window should open.

min api

In the option “Choose a running android device” you will find to device to select and send your app,this is because can select a device with minimum API level is 18 as in my case i give API level 18 as minimum SDK version while creating project and my device version is not compatible with that. To check your device version go to setting on your phone and check Version , in my case my device version is 4.1.1.

new app

 

In “Minimum Required SDK” you should give API level compatible with your phone. so can i make my whole project again and make all program again to correct my mistake ? Fortunately No … !!! =) you can edit your minimum required SDK by editing your Manifest.xml file.

AndroidManifest.xml is the description of what my application is. So it contains the list of all activities and all the security item that my app needs access and also contains the permission and privilege e.g permission to get data from GPS, send/receive call etc.

Open your project and search for AndroidManifest.xml file and open it, here is my AndroidManifest.xml.

manifest

 

 

Double click and open AndroidManifest.xml. Here you see different option including permission, package version etc.  You will learn about AndroidManifest in next lectures.

manixmal

 

Click on Manifest.xml you can see the following page.

xml

 

Here you see the option of minsdkVersion=18 , change it say minsdkversion= 8 and save it and run app on phone . you will see that your phone will show online at this time and you will able to send your app on phone.

api8


Viewing all articles
Browse latest Browse all 21

Trending Articles