Android - Installation failed with message: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED - android

I cannot run my app anymore, I have the error:
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
I read many other questions about it here but I didn't find a solution so far, could anyone have a look at my manifest and tell me what I did wrong?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="kalianey.com.bonnieandclit" >
<application
android:name="Utils.KYController"
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>
<activity
android:name=".Register"
android:label="#string/title_activity_register" >
</activity>
<activity
android:name=".People"
android:label="#string/title_activity_people" >
</activity>
</application>
</manifest>
EDIT: error log
Installing kalianey.com.bonnieandclit
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/kalianey.com.bonnieandclit"
pkg: /data/local/tmp/kalianey.com.bonnieandclit
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
EDIT 2: screenshot of the file structure

The error message is non intuitive at all. You have a package that has a capital letter. Utils should be changed to util. Once the package name is changed switch it in your manifest to be:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="kalianey.com.bonnieandclit" >
<application
android:name="utils.KYController"
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>
<activity
android:name=".Register"
android:label="#string/title_activity_register" >
</activity>
<activity
android:name=".People"
android:label="#string/title_activity_people" >
</activity>
</application>
</manifest>
Notice Utils.KYController was changed to utils.KYController
Once you make that package name change the problem will be fixed.

In my project,I have two package and I change my "android.intent.action.MAIN" to a new package,that i found this problem.Then i copy into my old package,and it gone. myabe it can help you.

Related

Activity class does not exist in android studio

I keep getting this error when I try to run my android studio. I tried to copy, paste my previous project bit by bit. After I finished it I got this error. I'm really stuck on this one.
Thanks in advance :D
This is my Activity manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.iussystem">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".TermsOfService"></activity>
<activity android:name=".ForgotPassword" />
<activity android:name=".Registracija" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
If you are saying your app is in com/example/iusystem/MainActivity.java, isnt that a typo?
Either change your package:
package="com.example.iussystem"
to
package="com.example.iusystem"
Or move your activity the other way.

I can not run my application Android Studio

Can you help me please?
When I try to run, the compiler show me this. Some idea? Thanks
This is the AndroidManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.cyrax.rocas">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Infoclase"></activity>
</application>
</manifest>
Clean your project and rebuild it.

Can't open APK file on smartphone

I've made an application in eclipse using android project. Now I installed that APK-file on my smartphone.
When I hit install, it just installs, it's fine. But then I get the option "Cancel", or "open". But I can't click on "Open".
Just nothing happens every time I try to open it. It's not with my other apps.
I can find it at "downloads", but I just can't open it. I can update and install it again countless times. Unknown sources in my settings is on.
Does anyone know this issue, and/or how to fix it?
Help would be appreciated.
Manifest code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.rodekruis"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/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>
<activity
android:name=".BezoekActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.example.rodekruis.BezoekActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".AfspraakActivity"
android:label="#string/title_activity_afspraak" >
</activity>
<activity
android:name=".ContactActivity"
android:label="#string/title_activity_contact" >
</activity>
<activity
android:name=".MeningActivity"
android:label="#string/title_activity_mening" >
</activity>
<activity
android:name=".RouteActivity"
android:label="#string/title_activity_route" >
</activity>
<activity
android:name=".SpecialistenActivity"
android:label="#string/title_activity_specialisten" >
</activity>
<activity
android:name=".BWCActivity"
android:label="#string/title_activity_bwc" >
</activity>
<activity
android:name=".AgendaActivity"
android:label="#string/title_activity_agenda" >
</activity>
<activity
android:name=".InfoActivity"
android:label="#string/title_activity_informatie" >
</activity>
<activity
android:name=".VriendActivity"
android:label="#string/title_activity_vriend" >
</activity>
<activity
android:name=".FoldersActivity"
android:label="#string/title_activity_folders" >
</activity>
<activity
android:name=".NieuwsActivity"
android:label="#string/title_activity_nieuws">
</activity>
</application>
</manifest>
Have you been able to launch it through ADB directly in Android Studio ?
You might want to do it this way during your implementation, it is much faster to build and test.
Just enable the developer mode in the settings and the "usb debugging" in the new menu that appeared (also in settings). You can now connect your phone to your computer and enjoy the simplicity of creating apps on Android.
Register your launchable Activity in AndroidManifest.xml like this-
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<!--______________Activities______________-->
<activity
android:name=".MainActivity" //launchable activity
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Hope this will help you.

Error in manifest when i try to install my android app

I have the next error when I am trying to install my android application to a virtual device (I couldn't test in a real phone).
INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
Here is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="developer.negabur.chistes" >
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="Business.Categorias"
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>
Your activity name needs to be prefixed with a period, like the following
android:name=".BusinessCategorias"

Eclipse - .apk throwing out <activities>

Have a simple app with 2 activities. Works on USB / SYNC, but when I export it to get an .apk file, Mainfest.xml throws out any reference to the 2nd .
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.easy"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Splash" 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=".StartingPoint" android:label="#string/app_name" >
<intent-filter>
<action android:name="com.example.easy.STARTINGPOINT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
The 1st activity (.Splash) gets deleted during compile. I've had this problem with my first project so I started over with a very simple one to see if its a continuing problem or my first project.
Seems to be a continuing problem.

Categories

Resources