我更改了我的安卓应用程序版本,我的应用程序在安卓工作室上运行,但当我生成apk和afte安装时,它停止了



我更改了我的android应用程序版本,我的应用程序在android studio上运行,但当我生成apk并将其安装在ph上时,不幸的是,它在打开时停止了

build.gradle

apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
useLibrary 'org.apache.http.legacy'
packagingOptions {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
}
defaultConfig {
applicationId "anoop.example.com.rssreader"
minSdkVersion 15
targetSdkVersion 23
versionCode 2
versionName "1.1"
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "4g"
}
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 'org.apache.httpcomponents:httpclient:4.3.6'
// compile 'org.apache.httpcomponents:httpmime:4.2.6'
compile fileTree(dir: 'libs', include: ['*.jar'])

compile('org.apache.httpcomponents:httpmime:4.3.6') {
exclude module: 'httpclient'
}
compile 'com.google.android.gms:play-services-location:8.3.0'
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'org.jsoup:jsoup:1.7.1'
compile 'com.google.code.gson:gson:2.2.4'
compile 'org.apache.commons:commons-lang3:3.1'
compile 'org.apache.commons:commons-collections4:4.0'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile 'com.facebook.android:facebook-android-sdk:3.23.1'
compile 'com.github.manuelpeinado.fadingactionbar:fadingactionbar:3.1.2'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.etsy.android.grid:library:1.0.5'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.melnykov:floatingactionbutton:1.3.0'
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
compile 'com.android.support:design:23.3.0' 

堆栈跟踪

05-27 21:35:07.854 1534-4425/?I/ActivityManager:在显示器0上从uid 10014启动u0{act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]flg=0x10200000 cmp=anoop.example.com.rsreader/.MainActivity(具有附加项)}05-27 21:35:08.808 4462-4472/?I/art:后台粘性并发标记扫描GC释放257(20KB)AllocSpace对象,0(0B)LOS对象,0%可用,2MB/2MB,暂停36.607ms总计136.565ms05-27 21:35:08.193 4462-4479/?W/EGL_emulation:eglSurfaceAttrib未实现05-27 21:35:08.193 4462-4479/?W/OpenGLRenderer:未能在曲面0xb28bf760上设置EGL_SWAP_BEHAVIOR,错误=EGL_SUCCESS05-27 21:35:88.240 1862-2124/?E/Surface:getSlotFromBufferLocked:未知缓冲区:0xaa2b36e005-27 21:35:08.273 4462-4479/?W/EGL_emulation:eglSurfaceAttrib未实现05-27 21:35:08.273 4462-4479/?W/OpenGLRenderer:未能在曲面0xadc13f80上设置EGL_SWAP_BEHAVIOR,错误=EGL_SUCCESS05-27 21:35:08.313 4462-4479/?E/Surface:getSlotFromBufferLocked:未知缓冲区:0xaa2b176005-27 21:35:08.396 1534-2064/?I/WindowManager:切换到实际应用程序窗口:窗口{d3469cd u0 anoop.example.com.rssreader/anoop.exexample.com.rssreader.MainActivity}05-27 21:35:08.567 1534-1553/?I/ActivityManager:显示另一个操作示例。com.rssreader/.MainActivity:+681ms

版本代码和名称会被build.gradle文件中的值覆盖。因此,编辑您的build.gradle并重建。

放置与versionCode相同的versionName。(两个版本都是2)如果你也提供了版本,也不要忘记更新你的清单:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.foo"
android:versionName="2">

相关内容

最新更新