Как избавиться от ошибки: «java .util.concurrent.ExecutionException: com. android .builder.internal.aapt.v2.Aapt2Exception: ошибка AAPT2» - PullRequest
0 голосов
/ 20 марта 2020

Что я сделал:

  • Я использую ShimmerAndroidAPI путем импорта через zip-файл в Android Studio 3.6.1.
  • Сбой сборки с одной ошибкой:

java .util.concurrent.ExecutionException: com. android .builder.internal.aapt.v2.Aapt2Exception: ошибка AAPT2 : проверьте логи на детали

  • Я попытался добавить classpath 'com.android.tools.build:gradle:3.2.0-alpha18' в build.gradle (ShimmerInstrumentDriver), который является библиотекой, файл, как упомянуто в этом ответе.
  • Тогда меня попросили обновить ваш gradle до 4.6.
  • Я обновил его, а затем столкнулся с другой проблемой «Не удалось применить плагин [id 'com. android .application']» поверх снова, хотя файл build.gradle был обновлен с classpath 'com.android.tools.build:gradle:3.6.1' и gradle Файл -wrapper.properties был обновлен с distributionUrl=https://services.gradle.org/distributions/gradle-5.6.4-all.zip. Я проверил оба файла.
  • Затем эта проблема была устранена путем возврата обновления. Файл build.gradle был обновлен как classpath 'com.android.tools.build:gradle:3.1.3', а файл gradle-wrapper.properties был обновлен как distributionUrl=https://services.gradle.org/distributions/gradle-5.4.1-all.zip

Что я ищу:

  • Я ищу способ избавиться от этой ошибки -

java .util .concurrent.ExecutionException: com. android .builder.internal.aapt.v2.Aapt2Exception: ошибка AAPT2: проверьте подробности в журналах

Буду очень признателен за любые указания или предложения по этому вопросу. Спасибо!

build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    ext.kotlin_version = '1.2.30'
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

    }
}
// Plugin used to upload authenticated files to BinTray through Gradle
plugins {
    id "com.jfrog.bintray" version "1.7.3"
}
allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url  "http://dl.bintray.com/shimmerengineering/Shimmer"
        }
    }
}

Выход Logcat

    2020-03-19 16:08:10.095 863-3093/? E/BatteryStatsService: modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0}
2020-03-19 16:08:10.940 17964-17998/? E/art: The String#value field is not present on Android versions >= 6.0
2020-03-19 16:08:16.111 18045-18083/? E/DialerDialerBaseApplica: com.android.dialer.DialerBaseApplication.getResources:135 
    java.lang.IllegalStateException: Resources are not initialized yet. Do not call getResource() in constructors of injected classes
        at oii.b(PG:8)
        at bbt.getResources(PG:3)
        at jep.b(PG:1)
        at jdz.b(PG:2)
        at jla.a(PG:6)
        at jhz.h(PG:6)
        at jid.b(PG:5)
        at jid.handleMessage(PG:52)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:154)
        at android.os.HandlerThread.run(HandlerThread.java:61)
2020-03-19 16:08:16.357 21171-21307/? E/ancr: Phenotype API error. Event # bzns@20034476, EventCode: 5 [CONTEXT service_id=51 ]
    anbu: 29501: Stale snapshot (change count changed - expected 105  but was 104)
        at ancu.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):17)
        at anct.b(:com.google.android.gms@200616015@20.06.16 (040300-296104215):2)
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):92)
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):78)
        at aaes.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):8)
        at bkua.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):2)
        at suk.b(:com.google.android.gms@200616015@20.06.16 (040300-296104215):14)
        at suk.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):9)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at tak.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):0)
        at java.lang.Thread.run(Thread.java:761)
2020-03-19 16:08:16.358 21171-21307/? E/AsyncOperation: serviceID=51, operation=CommitToConfigurationOperationCall
    OperationException[Status{statusCode=Stale snapshot (change count changed - expected 105  but was 104), resolution=null}]
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):93)
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):78)
        at aaes.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):8)
        at bkua.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):2)
        at suk.b(:com.google.android.gms@200616015@20.06.16 (040300-296104215):14)
        at suk.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):9)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at tak.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):0)
        at java.lang.Thread.run(Thread.java:761)
2020-03-19 16:08:16.387 18045-18058/? E/MendelPackageState: Failed to commit to config
    jfb: 29501: Stale snapshot (change count changed - expected 105  but was 104)
        at iwx.a(PG:3)
        at iwx.a(PG:4)
        at jwh.e(PG)
        at jwk.a(PG:13)
        at izc.onTransact(PG:4)
        at android.os.Binder.execTransact(Binder.java:565)
2020-03-19 16:08:17.326 21171-21307/? E/ancr: Phenotype API error. Event # bzns@26085b2, EventCode: 5 [CONTEXT service_id=51 ]
    anbu: 29501: Stale snapshot (change count changed - expected 20  but was 19)
        at ancu.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):17)
        at anct.b(:com.google.android.gms@200616015@20.06.16 (040300-296104215):2)
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):92)
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):78)
        at aaes.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):8)
        at bkua.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):2)
        at suk.b(:com.google.android.gms@200616015@20.06.16 (040300-296104215):14)
        at suk.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):5)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at tak.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):0)
        at java.lang.Thread.run(Thread.java:761)
2020-03-19 16:08:17.327 21171-21307/? E/AsyncOperation: serviceID=51, operation=CommitToConfigurationOperationCall
    OperationException[Status{statusCode=Stale snapshot (change count changed - expected 20  but was 19), resolution=null}]
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):93)
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):78)
        at aaes.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):8)
        at bkua.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):2)
        at suk.b(:com.google.android.gms@200616015@20.06.16 (040300-296104215):14)
        at suk.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):5)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at tak.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):0)
        at java.lang.Thread.run(Thread.java:761)
2020-03-19 16:08:17.504 21171-21307/? E/ancr: Phenotype API error. Event # bzns@a4b82e93, EventCode: 5 [CONTEXT service_id=51 ]
    anbu: 29501: Stale snapshot (change count changed - expected 30  but was 29)
        at ancu.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):17)
        at anct.b(:com.google.android.gms@200616015@20.06.16 (040300-296104215):2)
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):92)
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):78)
        at aaes.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):8)
        at bkua.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):2)
        at suk.b(:com.google.android.gms@200616015@20.06.16 (040300-296104215):14)
        at suk.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):5)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at tak.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):0)
        at java.lang.Thread.run(Thread.java:761)
2020-03-19 16:08:17.504 21171-21307/? E/AsyncOperation: serviceID=51, operation=CommitToConfigurationOperationCall
    OperationException[Status{statusCode=Stale snapshot (change count changed - expected 30  but was 29), resolution=null}]
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):93)
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):78)
        at aaes.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):8)
        at bkua.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):2)
        at suk.b(:com.google.android.gms@200616015@20.06.16 (040300-296104215):14)
        at suk.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):5)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at tak.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):0)
        at java.lang.Thread.run(Thread.java:761)
2020-03-19 16:08:17.628 21171-21307/? E/ancr: Phenotype API error. Event # bzns@bedde72d, EventCode: 5 [CONTEXT service_id=51 ]
    anbu: 29501: Stale snapshot (change count changed - expected 22  but was 21)
        at ancu.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):17)
        at anct.b(:com.google.android.gms@200616015@20.06.16 (040300-296104215):2)
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):92)
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):78)
        at aaes.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):8)
        at bkua.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):2)
        at suk.b(:com.google.android.gms@200616015@20.06.16 (040300-296104215):14)
        at suk.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):5)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at tak.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):0)
        at java.lang.Thread.run(Thread.java:761)
2020-03-19 16:08:17.629 21171-21307/? E/AsyncOperation: serviceID=51, operation=CommitToConfigurationOperationCall
    OperationException[Status{statusCode=Stale snapshot (change count changed - expected 22  but was 21), resolution=null}]
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):93)
        at ancr.a(:com.google.android.gms@200616015@20.06.16 (040300-296104215):78)
        at aaes.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):8)
        at bkua.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):2)
        at suk.b(:com.google.android.gms@200616015@20.06.16 (040300-296104215):14)
        at suk.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):5)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at tak.run(:com.google.android.gms@200616015@20.06.16 (040300-296104215):0)
        at java.lang.Thread.run(Thread.java:761)
2020-03-19 16:08:17.740 21242-21277/? E/GmsClient: unable to connect to service: com.google.android.gms.auth.key.retrieval.service.START on com.google.android.gms
2020-03-19 16:08:18.312 21330-21497/? E/LauncherUtil: Failed to get system resource ID.
2020-03-19 16:08:19.374 21330-21543/? E/LauncherUtil: Failed to get system resource ID.
2020-03-19 16:08:23.300 863-1365/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=284, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ]
2020-03-19 16:08:28.335 863-1365/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=283, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ]
2020-03-19 16:08:44.261 18165-18200/? E/GEL_DELAYED_EVENT_DEBUG: Failed delayed event dispatch, no dispatchers.
2020-03-19 16:11:59.336 24765-24765/? E/GsaVoiceInteractionSrv: updateScreenStatus
2020-03-19 16:11:59.337 24765-24765/? E/HotwordState: FASE: true, SHwR: false, ACR: true, HR: true, ACbSS: false, ACbHE: false, SO:true, ARS: false
2020-03-19 16:12:03.210 21171-17299/? E/WakeLock: GCM_HB_ALARM release without a matched acquire!
2020-03-19 16:12:16.303 18320-18441/? E/GmsUtils: Failed to connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
2020-03-19 16:12:16.428 18320-18444/? E/GmsUtils: Failed to connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
2020-03-19 16:21:13.453 21330-21497/? E/GeofenceHelper: Failed: remove geofences by PendingIntent
2020-03-19 16:21:13.513 21330-18536/? E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
2020-03-19 16:21:13.514 21330-18536/? E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.
2020-03-19 16:21:59.374 24765-24765/? E/GsaVoiceInteractionSrv: updateScreenStatus
2020-03-19 16:21:59.375 24765-24765/? E/HotwordState: FASE: true, SHwR: false, ACR: true, HR: true, ACbSS: false, ACbHE: false, SO:true, ARS: false
2020-03-19 16:23:58.831 863-879/? E/BatteryStatsService: modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0}
2020-03-19 16:31:59.450 24765-24765/? E/GsaVoiceInteractionSrv: updateScreenStatus
2020-03-19 16:31:59.451 24765-24765/? E/HotwordState: FASE: true, SHwR: false, ACR: true, HR: true, ACbSS: false, ACbHE: false, SO:true, ARS: false
2020-03-19 16:39:00.105 863-1365/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=289, [ Capabilities: NOT_RESTRICTED&TRUSTED&NOT_VPN&FOREGROUND] ]
2020-03-19 16:39:00.127 863-1365/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=286, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]
2020-03-19 16:41:59.527 24765-24765/? E/GsaVoiceInteractionSrv: updateScreenStatus
2020-03-19 16:41:59.528 24765-24765/? E/HotwordState: FASE: true, SHwR: false, ACR: true, HR: true, ACbSS: false, ACbHE: false, SO:true, ARS: false
2020-03-19 16:48:03.144 21171-17299/? E/WakeLock: GCM_HB_ALARM release without a matched acquire!
2020-03-19 16:51:59.603 24765-24765/? E/GsaVoiceInteractionSrv: updateScreenStatus
2020-03-19 16:51:59.605 24765-24765/? E/HotwordState: FASE: true, SHwR: false, ACR: true, HR: true, ACbSS: false, ACbHE: false, SO:true, ARS: false
2020-03-19 16:53:58.878 863-879/? E/BatteryStatsService: modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0}
2020-03-19 16:57:13.364 21330-21543/? E/GeofenceHelper: Failed: remove geofences by PendingIntent
2020-03-19 16:57:13.411 21330-18910/? E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
2020-03-19 16:57:13.412 21330-18910/? E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.
2020-03-19 17:01:59.680 24765-24765/? E/GsaVoiceInteractionSrv: updateScreenStatus
2020-03-19 17:01:59.681 24765-24765/? E/HotwordState: FASE: true, SHwR: false, ACR: true, HR: true, ACbSS: false, ACbHE: false, SO:true, ARS: false
2020-03-19 17:10:13.831 19066-19118/? E/BugleDataModel: ParticipantRefresh: Failed to update participants.
2020-03-19 17:10:13.950 19066-19118/? E/BugleDataModel: ParticipantRefresh: Failed to update participants.
2020-03-19 17:11:32.529 863-1365/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=290, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ]
2020-03-19 17:11:32.535 863-1365/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ TRACK_DEFAULT id=291, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
2020-03-19 17:11:59.756 24765-24765/? E/GsaVoiceInteractionSrv: updateScreenStatus
2020-03-19 17:11:59.757 24765-24765/? E/HotwordState: FASE: true, SHwR: false, ACR: true, HR: true, ACbSS: false, ACbHE: false, SO:true, ARS: false
2020-03-19 17:21:59.832 24765-24765/? E/GsaVoiceInteractionSrv: updateScreenStatus
2020-03-19 17:21:59.833 24765-24765/? E/HotwordState: FASE: true, SHwR: false, ACR: true, HR: true, ACbSS: false, ACbHE: false, SO:true, ARS: false
2020-03-19 17:23:58.919 863-879/? E/BatteryStatsService: modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0}
2020-03-19 17:24:03.065 21171-17299/? E/WakeLock: GCM_HB_ALARM release without a matched acquire!
2020-03-19 17:24:09.167 19499-19540/? E/GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
2020-03-19 17:24:10.299 19564-19564/? E/ConfigUpdater: Received malformed URL while handling Gservices.CHANGED_ACTION intent_firewall: null null
2020-03-19 17:24:10.319 19564-19564/? E/ConfigUpdater: Received malformed URL while handling Gservices.CHANGED_ACTION apn_db: null null
2020-03-19 17:24:10.324 19564-19564/? E/ConfigUpdater: Received malformed URL while handling Gservices.CHANGED_ACTION tzdata: null null
2020-03-19 17:24:10.328 19564-19564/? E/ConfigUpdater: Received malformed URL while handling Gservices.CHANGED_ACTION selinux: null null
2020-03-19 17:24:10.333 19564-19564/? E/ConfigUpdater: Received malformed URL while handling Gservices.CHANGED_ACTION carrier_provisioning_urls: null null
2020-03-19 17:24:10.591 21242-21277/? E/GmsClient: unable to connect to service: com.google.android.gms.auth.key.retrieval.service.START on com.google.android.gms
2020-03-19 17:31:59.908 24765-24765/? E/GsaVoiceInteractionSrv: updateScreenStatus
2020-03-19 17:31:59.909 24765-24765/? E/HotwordState: FASE: true, SHwR: false, ACR: true, HR: true, ACbSS: false, ACbHE: false, SO:true, ARS: false
2020-03-19 17:33:13.911 21330-21515/? E/GeofenceHelper: Failed: remove geofences by PendingIntent
2020-03-19 17:33:13.971 21330-19734/? E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
2020-03-19 17:33:13.972 21330-19734/? E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...