我正在开发一个Android应用程序,当我在我的本地系统中构建它并在模拟器上运行时一切正常,但是一旦我在手机上发布并安装apk,它就会崩溃并出现错误 -
There was an error parsing the package
正如您所看到的,我正在构建最新的SDK和构建工具,而我的手机也在API上运行相同的版本。我也允许安装Untrusted Sources并签署我的应用程序,
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:0.2.4@aar'
compile 'com.mikepenz:crossfader:1.3.7@aar'
compile 'com.mikepenz:crossfadedrawerlayout:0.3.4@aar'
compile 'com.mikepenz:google-material-typeface:2.2.0.1@aar'
compile 'com.mikepenz:fontawesome-typeface:4.4.0.1@aar'
compile 'com.mikepenz:octicons-typeface:3.0.0.1@aar'
// Charts
compile 'com.github.blackfizz:eazegraph:1.0.10-SNAPSHOT@aar'
}
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>
答案 0 :(得分:0)
尝试将构建工具版本更改为24.0.0