[英]Why does Android Studio get stuck when building the signed APK?
构建签名的APK时, Android Studio(3.4.1)会阻塞
我一直在等待40多分钟来构建APK,但Android Studio无法前进,但卡住了:
Android Studio陷入了此任务:
app: transformClassesAndResourcesWithR7ForRelease
这是我的build.gradle文件的结构:
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.firebase.firebase-perf'
android {
compileSdkVersion 29
buildToolsVersion = '29.0.0 rc2'
defaultConfig {
applicationId "com.raven.okami"
minSdkVersion 23
targetSdkVersion 29
versionCode 10
versionName "1.9.6.29"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
disable "FirestoreAdapterMissingStartListeningMethod",
"FirestoreAdapterMissingStopListeningMethod"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
implementation 'androidx.paging:paging-runtime:2.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha06'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation "androidx.lifecycle:lifecycle-extensions:2.0.0"
*// More dependecies*
}
apply plugin: 'com.google.gms.google-services'
拜托,有人帮我。
编辑:我正在调查,并在我的Android Studio项目中反复尝试,发现了一些有趣的东西。 我发现这一切都是由于Firebase Perfomance造成的,为什么我只删除此依赖项,并在最多3分钟的时间内完成项目的编译。
有谁知道为什么会这样吗? 您知道如何避免这种情况吗? 我需要使用Firebase性能。
尝试“文件”>“使缓存无效并重新启动”。 Android Studio会缓存很多文件,但实际上并不会清除它们,因此随着时间的流逝,它可能会陷入困境,并使gradle和apk生成等操作变得非常缓慢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.