INSTALL_PARSE_FAILED_MANIFEST_MALFORMED错误android

时间:2017-11-19 00:41:33

标签: android android-manifest

尝试在手机上部署更新的应用时出现INSTALL_PARSE_FAILED_MANIFEST_MALFORMED错误。 (不能完全回想起我改变的一切,我必须承认) 这是logcat:

    11-19 01:17:34.709 344-344/? E/installd: Couldn't opendir/data/app/vmdl535902261.tmp: No such file or directory
    11-19 01:17:34.710 19506-19506/? E/Pm: Failure details:Bundle[{android.content.pm.extra.STATUS=4,android.content.pm.extra.PACKAGE_NAME=ProjectRomero.CarRemote, android.content.pm.extra.SESSION_ID=535902261, android.content.pm.extra.LEGACY_STATUS=-108, android.content.pm.extra.STATUS_MESSAGE=INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl535902261.tmp/base.apk (at Binary XML file line #28): <activity> does not have valid android:name}]

和我的AndroidManifest:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="ProjectRomero.CarRemote">

        <uses-permission android:name="android.permission.BLUETOOTH" />
        <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
        <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

        <uses-feature
            android:name="android.hardware.bluetooth_le"
            android:required="true" />

        <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=".scan_activity"
                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=".remote_activity"
                android:label="@string/app_name">
            </activity>

        </application>
    </manifest>

我的两个活动标题:

  package ProjectRomero.CarRemote;
  //imports
  public class remote_activity extends AppCompatActivity {}



  package ProjectRomero.CarRemote;
  //imports
  public class scan_activity extends AppCompatActivity {}

我必须承认我很困惑,我该如何纠正这个错误?尝试清理了很多次,甚至重新创建了一个项目并复制了代码,删除了手机上以前版本的应用程序,重新启动了我的手机,但仍然没有...

提前致谢:)

1 个答案:

答案 0 :(得分:0)

更改包=“ProjectRomero.CarRemote” 在清单

中打包=“projectromero.carremote”

出于某种原因,Caps将其关闭