Android Studio:解析签名发布时出错APK
我正在开发一个android应用程序,当我在本地系统中构建它并在仿真器上运行时,一切正常,但只要我制作并发布并在手机上安装了apk ,它崩溃错误 -Android Studio:解析签名发布时出错APK
There was an error parsing the package
正如你所看到的,我用最新的SDK建设和构建工具,而我的手机上运行的API相同的版本太多。我也允许不可信来源的安装,并签署我的应用程序,
的build.gradle -
apply plugin: 'com.android.application'
android {
signingConfigs {
config {
keyAlias 'xxxxx'
keyPassword 'xxxx'
storeFile file('E:/Projects/Android/oiu.jks')
storePassword 'xxxxx'
}
}
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "sd.edu.oiu.medicine.mustafa"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.1.1'
compile 'com.android.support:cardview-v7:24.1.1'
compile 'com.firebase:firebase-client-android:2.5.1+'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile project(':libs:MaterialDrawer')
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.mikepenz:itemanimators:[email protected]'
compile 'com.mikepenz:crossfader:[email protected]'
compile 'com.mikepenz:crossfadedrawerlayout:[email protected]'
compile 'com.mikepenz:google-material-typeface:[email protected]'
compile 'com.mikepenz:fontawesome-typeface:[email protected]'
compile 'com.mikepenz:octicons-typeface:[email protected]'
// Charts
compile 'com.github.blackfizz:eazegraph:[email protected]'
}
AndroidManifest.xml中 -
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="sd.edu.oiu.medicine.mustafa"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="24" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/MaterialDrawerTheme.Light.DarkToolbar.TranslucentStatus"
tools:replace="icon" >
<activity
android:name=".SplashScreen"
android:theme="@style/SplashTheme" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".LoginActivity"
android:label="@string/login" />
<activity
android:name=".RegisterActivity"
android:label="@string/register"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".RestPasswordActivity"
android:label="@string/reset_password"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:launchMode="singleTop" />
<activity
android:name=".ActivityResults"
android:label="@string/drawer_item_student_results" />
<activity
android:name=".ActivitySecondResults"
android:label="@string/drawer_item_student_second_results" />
<activity
android:name=".StudentsList"
android:label="@string/drawer_item_student_list" />
<activity
android:name=".RobotNoor"
android:label="@string/robot_noor" />
<activity
android:name=".ActivityFees"
android:label="@string/drawer_item_student_fees" />
<activity
android:name=".AboutActivity"
android:label="@string/about_app" />
<!-- adding our service -->
<service android:name=".NotificationListener" />
</application>
</manifest>
尝试改变构建工具版本24.0 .0
也没有工作..即使有新的空项目 – MustafaTaj
你能给我完整的错误报告从Android监视器 – RadiBarq
APK的构建是成功的,但问题是,当我尝试从android设备安装它,如果得到这个解析错误,如何从中得到错误报告? – MustafaTaj
我甚至试图让新的空android项目和登录并具有相同的错误rel缓解apk – MustafaTaj
你找到了解决办法? –
突然android工作室开始正确签署apk应用程序,我不知道如何,因为我用了很多方法来解决问题 – MustafaTaj