[英]Installation did not succeed. The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
[英]When I Update my Phone to Android 12, Installation did not succeed. The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
自從我將手機更新為 Android 12 不幸的是,當我將項目運行到我的手機時,我正在完美地處理我的項目,出現此錯誤:
安裝沒有成功。 無法安裝應用程序:INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
apk 列表:[0] 'C:\Users\Microsoft\AndroidStudioProjects\YmmyServer\app\build\outputs\apk\debug\app-debug.apk' 安裝失敗,原因是:'null' 重試
這是我的 build.gradle(Project) 文件:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.android.tools.build:gradle:4.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
這是我的 build.gradle(Module) 文件:
plugins {
id 'com.android.application'
}
android {
compileSdkVersion 32
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.ymmyserver"
minSdkVersion 30
targetSdkVersion 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation 'com.github.jd-alexander:android-flat-button:v1.1'
// implementation 'info.hoang8f:fbutton:1.0.5'
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.firebase:firebase-storage'
implementation 'com.firebaseui:firebase-ui-database:8.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation "androidx.cardview:cardview:1.0.0"
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.google.firebase:firebase-core:10.2.0'
implementation 'com.google.firebase:firebase-database'
implementation 'com.google.firebase:firebase-analytics'
implementation platform('com.google.firebase:firebase-bom:29.1.0')
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.navigation:navigation-fragment:2.4.1'
implementation 'androidx.navigation:navigation-ui:2.4.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
這是 Mainifest 文件:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ymmyserver">
<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/Theme.Ymmy">
<activity android:name=".FoodList"></activity>
<activity
android:name=".Home"
android:label="@string/title_activity_home"
android:theme="@style/Theme.Ymmy.NoActionBar"></activity>
<activity android:name=".SignIn" />
<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>
我該怎么辦請幫助我
嘗試在您的AndroidManifest.xml
文件中使用此標簽進行活動
<activity
android:name=".MainActivity"
android:exported="true">
通過在 Mainifest 文件中的主要 Activity 添加 android:exported="true" 來解決:
<activity android:name=".MainActivity"
android:exported="true">
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.