I've looked at other postings about the INSTALL_PARSE_FAILED_MANIFEST_MALFORMED but still can't figure out what's wrong with my particular manifest. Any suggestions?
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="ThePackage.SnapVest.MainActivity"
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="ThePackage.SnapVest.MyActiveOptions"
android:label="#string/title_activity_my_active_options" >
</activity>
<activity
android:name="ThePackage.SnapVest.MyTrades"
android:label="#string/title_activity_my_trades" >
</activity>
<activity
android:name="ThePackage.SnapVest.MyAccount"
android:label="#string/title_activity_my_account" >
</activity>
<activity
android:name="ThePackage.SnapVest.Leaderboard"
android:label="#string/title_activity_leaderboard" >
</activity>
</application>
So, where's my error?
Here's the actual sequence when I run it:
Waiting for device.
Target device: kyocera-event-1001c1c
Uploading file
local path: C:\Users\Roger Garrett\AndroidStudioProjects\SnapVest\app\build\apk\app-debug-unaligned.apk
remote path: /data/local/tmp/ThePackage.SnapVest
Installing ThePackage.SnapVest
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/ThePackage.SnapVest"
pkg: /data/local/tmp/ThePackage.SnapVest
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
It's all because you added company domain
(Android studio) in capital letters.
Or the Package name. Change it to small letters
and run the project. The problem will get resolved.
Change your
android:name="ThePackage.SnapVest.MainActivity"
TO
android:name=".MainActivity"
OR make all the characters in the package name lowercase except your class name
android:name="thepackage.snapvest.MainActivity"
Do change all the attributes named as android:name inside the activity tags as I suggested.
In my case the package name had a capital letter. After changing to all small letters the app got installed successfully
Related
When I tried to upload signed application. Play store shows android manifest.xml.343 error getting 'android:label' value references does not exist. I checked AndroidManifest.xml and Strings line by line but unfortunately I didn't figure out.
For simulate same error locally. I run "./aapt dump badging myapp.apk" It shows same error.
Manifest file
<application
android:name=".MainApplication"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:replace="android:name,android:theme">
<activity
android:name=".settings.ui.MainBoardActivity"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="#style/masterapp_core_theme.NoActionBar" />
<activity
android:name=".settings.ui.MASplashScreenActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
.........
</application>
Add below line inside <application> tag
android:label="#string/app_name"
After two day later I figure out how to approach the problem. First I found appt tool which is under the sdk/build-tools directory. When I run appt dump badging myapp.apk I saw label attribute value was empty. But problem was I have already defined it. To be sure I typed hardcoded value without referenced #string/name like that. But It doesn't solve.
Finally I compared changes in last month so problem was I defined string value at string.xml(tr) on the other module of project but I didn't define it on default string.xml. So aapt couldnt find references on default :)
I have created My First Android Hello World on Android Studio . but when I run it on emulator , it is not running neither installing it on Emulator .. Every time is only shows session '' Error only in log .. i have done restart several times . no use ,
this is my emulator Setting
My Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.administrator.facebooklogin" >
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I have changed the device and skins as well , but no use i have not found proper solution for session '' error .
Since you have just started, Explore Genymotion, a faster and better alternative to Android virtual devices for Android Development.
When running my app on my device straight from android studio, its running fine when deployed but its not actually installing - as in no icon in the menu etc (but it is in the settings under apps). Any help to solve would be great.
manifest is below.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.uk.malleymob.morecheatsforsims4" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".MainActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MainActivity" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".generalCodes"
android:label="#string/title_activity_general_codes" >
</activity>
<activity
android:name=".interactions"
android:label="#string/title_activity_interactions" >
</activity>
<activity
android:name=".skills"
android:label="#string/title_activity_skills" >
</activity>
<activity android:name="com.google.android.gms.ads.AdActivity" />
<activity
android:name=".simCheats"
android:label="#string/title_activity_cheats" >
</activity>
</application>
</manifest>
thanks in advance
Contrary to popular belief the action of this intent filter is not supposed to contain the activity's class name. This should fix it:
<activity
android:name=".MainActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
It is definitely installed on the phone, if it was run on the phone.
You could try compiling the apk and manually installing with adb:
I assume you are using gradle to build:
From project directory root:
View build tasks:
./gradlew tasks
./gradlew assembleDebug
The apk would be created in app/build/outputs/apk/
Now cd to that directory and run:
adb install my-app.apk
Make sure your device or emulator is connected
I am testing my app in Samsung Galaxy S2 with Android 2.3.4
I am following
http://developer.android.com/guide/topics/usb/accessory.html
instructions.
When ever I try to run it, usbManager.getAcccessoryList(); giving null.
Even I tried by connecting OTG cabel and pendrive to it.
My manifest.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test"
android:versionCode="1"
android:versionName="1.0" >
<uses-feature android:name="android.hardware.usb.accessory" />
<uses-sdk android:minSdkVersion="10" />
<application
android:icon="#drawable/icon"
android:label="#string/app_name" >
<uses-library android:name="com.android.future.usb.accessory" />
<activity
android:name=".SplashScreen"
android:clearTaskOnLaunch="true"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Advanced"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".Edit"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".Add"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="Main"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED"
android:resource="#xml/accessory_filter" />
</activity>
</application>
</manifest>
I had the same problem but my tablet has ICS. If try what I did, might work. I've been searching a lot for this, and couldn't find it, but thanks to all the people who have spent a few moments answering our questions, and the wiki resources on the web, I figured it out.
There are some missing files in some android builds, like the AINOL NOVO 7 PALADIN. I think this would work in any ICS tablet with the same issue. I understand that the Galaxy Tab has the same issue but as I don't have one I can't confirm this. If you do, let me know if it works for you.
So lets push the files in and see how it goes.
Copy some missing files into system drive:
$ adb remount
$ adb push AINOL_FIX/system/etc/permissions/android.hardware.usb.host.xml /system/etc/permissions
$ adb push AINOL_FIX/system/etc/permissions/android.hardware.usb.accessory.xml /system/etc/permissions
NOTE: If an error appears displaying Out of Memory, it's right and you must delete some files from system drive. I recommend some live wallpapers from system/app.
I understand that for writing system drive you should have root access, I already had it when I did this so if it doesn't work, root it.
You can get the files from android source builds or from a tablet where USB-HOST API is actually working. I got them from linaro's ICS build for pandaboard.
Now, you should try finding those files but for Gingerbread and you'll also need to push the
future.usb.accesory.jar into system/framework, if it isn't there already.
$ adb push AINOL_FIX/system/framework/com.android.future.usb.accessory.jar /system/framework
A cite from http://developer.android.com/guide/topics/usb/accessory.html: "Set the minimum SDK of the application to API Level 10 if you are using the add-on library or 12 if you are using the android.hardware.usb package."
You are using the android.hardware.usb package. So, you have to put the version to 12.
An error is found :-)
And don't forget to really change SDK version to 12, not only declare it!
Use com.android.future.usb package instead, according to docs.
I installed my game onto my phone using adb. It shows up on the delete app screen but not on the regular app screen, I think there is a problem with my phone registering applications correctly. Help!
Heres the install log from command prompt:
C:\Program Files\Android\android-sdk\platform-tools>adb install D:\EclipseWorksp
ace\GreenThumbs\bin\GreenThumbs.apk
1462 KB/s (443800 bytes in 0.296s)
pkg: /data/local/tmp/GreenThumbs.apk
Success
Edit:By "delete app screen" I meant when you are on the app screen and you hit menu and then remove, you go to a screen where you can select apps to uninstal.
Here's my manifest, it does have the intent and it was working at one point:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hernblog.GreenThumbs"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="10" />
<application>
<uses-library android:name="android.test.runner" />
</application>
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.hernblog.GreenThumbs" android:label="GreenThumbs Tests" />
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name="GreenThumbs"
android:label="#string/app_name"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</app`lication>
</manifest>
Make sure that you have the correct intent in your AndroidManifest.xml. It sound's like you don't have the launcher intent. These few lines should be under your activity block:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Ian is right, but you should also make sure that the package signature of you class remains the same from one version to another.
BTW your package name and your activity name looks wrong:
Try something like:
package="com.hernblog"
and
android:name=".GreenThumbs"