Java 错误:无法打开APK:无效偏移量
所有项目都成功构建,但是 我在尝试运行或调试项目时遇到此错误。 错误: Android资源链接失败W/ziparchive(6524):Zip:未找到 lfh开始时的签名,偏移量=41550366错误:无法打开APK: 无效的偏移量 我确实试着建造,清理,重建 重新启动使现金无效 将项目与Gradle文件同步 将Gradle、android studio更新至最新版本 my Build.gradle应用程序:Java 错误:无法打开APK:无效偏移量,java,android,android-studio,gradle,Java,Android,Android Studio,Gradle,所有项目都成功构建,但是 我在尝试运行或调试项目时遇到此错误。 错误: Android资源链接失败W/ziparchive(6524):Zip:未找到 lfh开始时的签名,偏移量=41550366错误:无法打开APK: 无效的偏移量 我确实试着建造,清理,重建 重新启动使现金无效 将项目与Gradle文件同步 将Gradle、android studio更新至最新版本 my Build.gradle应用程序: apply plugin: 'com.android.application' an
apply plugin: 'com.android.application'
android {
defaultConfig {
applicationId "com.geesdsada.app"
minSdkVersion 17
targetSdkVersion 28
versionCode 4
versionName "4.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
defaultConfig {
multiDexEnabled true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileSdkVersion 28
buildToolsVersion '28.0.3'
}
dependencies {
//fonts
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
//CounterFAB
implementation 'com.github.andremion:counterfab:1.0.1'
//
implementation 'com.github.jd-alexander:android-flat-button:v1.1'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.stripe:stripe-android:6.1.2'
implementation 'com.google.android.gms:play-services-base:16.1.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.8'
implementation 'com.google.firebase:firebase-database:16.1.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.squareup.okhttp3:okhttp:3.0.1'
implementation 'com.github.d-max:spots-dialog:0.7@aar'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'io.paperdb:paperdb:2.1'
//add libraries
implementation 'me.zhanghai.android.materialratingbar:library:1.3.2'
implementation 'com.stepstone.apprating:app-rating:2.0.0'
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
implementation 'io.paperdb:paperdb:2.1'
implementation 'com.github.rey5137:material:1.2.4'
implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1'
implementation 'com.parse:parse-android:1.16.3'
//update version to the latest one
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.google.firebase:firebase-auth:16.2.1'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-database:16.1.0'
implementation 'com.firebaseui:firebase-ui-database:1.2.0'
implementation 'com.cepheuen.elegant-number-button:lib:1.0.2'
implementation 'com.squareup.picasso:picasso:2.5.0'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
所有的代码都写得很好,并且运行良好,但是突然出现了这个错误。我在Android Studio中得到了这个错误,我所做的一切都是为了修复它,然后转到“构建”>“清理项目”,它就工作了。现在重建(Build->Rebuild)您的项目。我在Android Studio中得到了这个,我所做的一切都是为了修复它,然后转到“Build”>“Clean project”,它就工作了。现在重建(Build->Rebuild)您的项目