Android 软件包似乎已损坏(但通过电报安装)
我从filemanager在android设备上安装apk文件时遇到了一个非常奇怪的问题,一些信息如下:Android 软件包似乎已损坏(但通过电报安装),android,Android,我从filemanager在android设备上安装apk文件时遇到了一个非常奇怪的问题,一些信息如下: 我在android studio v.3.4.2中构建了签名的apk 验证 由jarsigner编写,没有错误 具有V1和V2签名的构建(编号 差异(发生时) 测试调试模式apk并释放两者 目标sdk是25(android 7.1.1) 我选中了“未知apk安装”,并且该选项已启用 我检查了filemanger安装apk的权限,该权限已启用 我用usb电缆将签名的apk复制到设备内部存储器中
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxx.xxx">
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_one"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_one"
android:supportsRtl="true"
android:theme="@style/AppTheme"
>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
</manifest>
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 28
buildToolsVersion "29.0.1"
defaultConfig {
applicationId "com.xxx.xxx"
minSdkVersion 25
targetSdkVersion 28
versionCode 2
versionName "2"
maxSdkVersion 28
multiDexEnabled true
}
signingConfigs {
release {
storeFile file("path to key.jks")
storePassword "some password"
keyAlias "key0"
keyPassword "some password"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationVariants.all { variant ->
variant.outputs.all { output ->
def project = "nameapk"
def SEP = "_"
def version = variant.versionName
def date = new Date();
def formattedDate = date.format('ddMMyy_HHmm')
def newApkName = project+".apk"
outputFileName = new File(newApkName)
}
}
}
debug {
minifyEnabled false
signingConfig signingConfigs.release
}
}
useLibrary 'org.apache.http.legacy'
}
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/' }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.core:core-ktx:1.2.0-alpha02'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta1'
implementation 'com.google.android.material:material:1.1.0-alpha09'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.13-beta-3'
androidTestImplementation 'androidx.test:runner:1.3.0-alpha02'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha02'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.journeyapps:zxing-android-embedded:3.5.0@aar'
implementation 'com.google.zxing:core:3.3.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation "com.google.code.ksoap2-android:ksoap2-android-assembly:${var}"
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
}