我能够在Android studio中成功构建APK文件,通过选择最低Android版本为5.0(Lollipop)作为在Android Studio中创建Android项目的一部分。Android Studio gradle build for Android兼容Android - 5.0棒棒糖等
但是,当我尝试在Android移动(5.0版本)中安装APK时,它会给包解析错误。
我也成立minifyEnabled为true
我已经注意到了Android的工作室包括“编译“com.android.support:appcompat-v7:24.2.0" 虽然我选择最低版本是棒棒堂(5.0)。 V24.2.0是棉花糖。
哪位高手帮我在这
AndroidManifest.xml中
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
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>
</application>
的build.gradle
在此处输入代码
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.simpletest"
minSdkVersion 21
targetSdkVersion 24
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:design:24.2.0'
}
完整build.gradle代码和AndroidManifest.xml –
感谢您的帮助。我已更新 – user1439582