2

I am working on Xamarin Android Application.When I run my application I am getting this error :

error: Unexpected install output: pkg: /data/local/tmp/com.iKart.androidapplication-Signed.apk Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

My Package Name is : com.iKart.androidapplication

I have already uninstall my application from device using adb uninstall,still I am getting this error.

What is the solution ? Please Help!

This is my Menifest :

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.iKart.androidapplication">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
<application android:theme="@style/Theme.AppCompat.Light" android:label="Mono.Droid">
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" />
<activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:label="@string/app_name" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>

In Android Device Logging(Visual Studio) I am getting :

09-16 11:16:20.736 D/AndroidRuntime(23211): 
09-16 11:16:20.736 D/AndroidRuntime(23211): >>>>>> AndroidRuntime START     com.android.internal.os.RuntimeInit <<<<<<
09-16 11:16:20.736 D/AndroidRuntime(23211): CheckJNI is OFF
09-16 11:16:20.746 D/dalvikvm(23211): Trying to load lib libjavacore.so 0x0
09-16 11:16:20.746 D/dalvikvm(23211): Added shared lib libjavacore.so 0x0
09-16 11:16:20.756 D/dalvikvm(23211): Trying to load lib libnativehelper.so 0x0
09-16 11:16:20.756 D/dalvikvm(23211): Added shared lib libnativehelper.so 0x0
09-16 11:16:20.957 D/AndroidRuntime(23211): Calling main entry com.android.commands.pm.Pm
09-16 11:16:20.967 D/PackageItemInfo(23211): PackageItemInfo static run 
09-16 11:16:20.967 D/AndroidRuntime(23211): Shutting down VM
09-16 11:16:21.157 D/dalvikvm(23211): GC_FOR_ALLOC freed 3206K, 51% free  3107K/6332K, paused 5ms, total 7ms
09-16 11:16:21.167 I/dalvikvm-heap(23211): Grow heap (frag case) to 7.284MB for 2359312-byte allocation
09-16 11:16:21.177 D/dalvikvm(23211): GC_CONCURRENT freed 9K, 38% free 5402K/8640K, paused 2ms+4ms, total 10ms
09-16 11:16:21.247 D/dalvikvm(23211): GC_FOR_ALLOC freed 466K, 35% free 5674K/8640K, paused 5ms, total 5ms
09-16 11:16:21.247 I/dalvikvm-heap(23211): Grow heap (frag case) to 7.779MB for 250016-byte allocation
09-16 11:16:21.257 D/dalvikvm(23211): GC_FOR_ALLOC freed 34K, 34% free 5917K/8888K, paused 5ms, total 5ms
09-16 11:16:21.257 I/dalvikvm-heap(23211): Grow heap (frag case) to 7.823MB for 46672-byte allocation
09-16 11:16:21.297 D/PackageItemInfo(23211): MessageLoop costTime=336
09-16 11:16:21.307 D/dalvikvm(23211): GC_CONCURRENT freed 1102K, 27% free 6590K/8936K, paused 1ms+1ms, total 6ms
09-16 11:16:21.307 D/dalvikvm(23211): Compiler shutdown in progress - discarding request
09-16 11:16:21.307 D/dalvikvm(23211): Compiler shutdown in progress - discarding request
09-16 11:16:21.307 D/dalvikvm(23211): Compiler shutdown in progress - discarding request
09-16 11:16:21.307 D/dalvikvm(23211): Compiler shutdown in progress - discarding request
09-16 11:16:21.307 D/dalvikvm(23211): Compiler shutdown in progress - discarding request
Rajnish Mishra
  • 826
  • 5
  • 21
Dhruv Gohil
  • 842
  • 11
  • 34

6 Answers6

7

I have solved this Myself : uninstall app from device and then run again.If it still not work then open Android SDK Command Prompt
(open Xamrin-studio > Tools > open a Android SDK Command Prompt)
then write following :

D:\Android\android-sdk> adb uninstall (Applicationpackagename)

you can get application package name from Androidmenifest file which is in properties folder.
This will definitely solve the error.
Thank you

Dhruv Gohil
  • 842
  • 11
  • 34
2

You should rename you package name

from

com.iKart.androidapplication

to

com.ikart.androidapplication

notice capital K is changd to small k

Go to settings and app and make sure any app with same package name is not installed try to reinstall again using adb install -r ikart.apk

Rajnish Mishra
  • 826
  • 5
  • 21
2

There are possible solution based on different scenario

Case 1: Uninstalling an app does sometimes leave the data folder behind we need to manually uninstall the app folder from "Application Manager"

Case 2: In case app uninstalled and don't see the app folder [with the app package name] then we need to use adb commands to uninstall these folders. Use [adb shell pm list packages] command which will show a list of all packages available in the device. If you see your app package in the list then run another adb command to remove [adb shell pm uninstall package name]

Case 3: If none of these works then we need to check the options provided by the Xamarin studio. Enable Shared mono runtime under project options.

Hopefully one of these should resolve your issue.

Jeeva
  • 162
  • 1
  • 9
0

I think you have a problem with facebook activity. this is how you correctly write it:

    <activity android:name="com.facebook.FacebookActivity" 
          android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" 
          android:theme="@android:style/Theme.Translucent.NoTitleBar" 
          android:label="@string/app_name" />
<meta-data android:name="com.facebook.sdk.ApplicationId" 
           android:value="@string/app_id" />
<provider android:authorities="com.facebook.app.FacebookContentProvider[your app_id (without brackets)]" 
          android:name="com.facebook.FacebookContentProvider" 
          android:exported="true" />
arsena
  • 1,935
  • 19
  • 36
  • I don't think so because after changing application name I am getting this error.Before it was working fine.I am working in xamarin so this format is correct.Though I have tried yours but not working.Thanks.@misho – Dhruv Gohil Sep 16 '15 at 06:46
  • ok, remove capital letter from package name: `iKart` => `ikart` – arsena Sep 16 '15 at 06:54
  • it isn't allowed to use capital letter in package name – arsena Sep 16 '15 at 06:57
0

In the AndroidManifest.xml settings change the "Install Location" from Default to auto

ajaykoppisetty
  • 364
  • 4
  • 10
0

In my case uninstalling all the previous apps that I had installed using Xamarin on the device solved the problem.

LearneriOS
  • 309
  • 6
  • 18