主要错误信息: Verification error in 和Had a hard failure verifying all classes, and was asked to abort in such situations.
错误日志:
FAILED: /opt2/data/p712/p712/out/target/product/tb8788p1_64_bsp/obj/APPS/SelfIntroduce_intermediates/oat/arm/package.odex
/bin/bash -c "(mkdir -p /opt2/data/p712/p712/out/target/product/tb8788p1_64_bsp/obj/APPS/SelfIntroduce_intermediates/oat/arm/ && rm -f /opt2/data/p712/p712/out/target/product/tb8788p1_64_bsp/obj/APPS/SelfIntroduce_intermediates/oat/arm/package.odex ) && (find /opt2/data/p712/p712/out/target/common/obj/APPS/SelfIntroduce_intermediates/ -maxdepth 1 -name \"classes*.dex\" | sort | xargs zip -qjX /opt2/data/p712/p712/out/target/product/tb8788p1_64_bsp/obj/APPS/SelfIntroduce_intermediates/oat/arm/package.odex ) && (mv /opt2/data/p712/p712/out/target/product/tb8788p1_64_bsp/obj/APPS/SelfIntroduce_intermediates/oat/arm/package.odex /opt2/data/p712/p712/out/target/product/tb8788p1_64_bsp/obj/APPS/SelfIntroduce_intermediates/oat/arm/package.odex.input ) && (rm -f /opt2/data/p712/p712/out/target/product/tb8788p1_64_bsp/obj/APPS/SelfIntroduce_intermediates/oat/arm/package.odex ) && (mkdir -p /opt2/data/p712/p712/out/target/product/tb8788p1_64_bsp/obj/APPS/SelfIntroduce_intermediates/oat/arm/ ) && (stored_class_loader_context_libs= && class_loader_context_arg=--class-loader-context=\\& && class_loader_context=\\& && stored_class_loader_context_arg=\"\" && uses_library_names=\"\" && optional_uses_library_names=\"\" && ANDROID_LOG_TAGS=\"*:e\" /opt2/data/p712/p712/out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx512m \${class_loader_context_arg} \${stored_class_loader_context_arg} --boot-image=/opt2/data/p712/p712/out/target/product/tb8788p1_64_bsp/dex_bootjars/system/framework/boot.art --dex-file=/opt2/data/p712/p712/out/target/product/tb8788p1_64_bsp/obj/APPS/SelfIntroduce_intermediates/oat/arm/package.odex.input --dex-location=/system/app/SelfIntroduce/SelfIntroduce.apk --oat-file=/opt2/data/p712/p712/out/target/product/tb8788p1_64_bsp/obj/APPS/SelfIntroduce_intermediates/oat/arm/package.odex --android-root=/opt2/data/p712/p712/out/target/product/tb8788p1_64_bsp/system --instruction-set=arm --instruction-set-variant=cortex-a53 --instruction-set-features=default --runtime-arg -Xnorelocate --compile-pic --no-generate-debug-info --generate-build-id --abort-on-hard-verifier-error --force-determinism --no-inline-from=core-oj.jar --compiler-filter=quicken --generate-mini-debug-info --compilation-reason=prebuilt ) && (rm /opt2/data/p712/p712/out/target/product/tb8788p1_64_bsp/obj/APPS/SelfIntroduce_intermediates/oat/arm/package.odex.input )"
dex2oatd F 04-02 19:14:00 1307 1307 method_verifier.cc:485] Verification error in android.support.v4.app.NotificationCompatBase$Action android.support.v4.app.NotificationCompat$Action$1.build(int, java.lang.CharSequence, android.app.PendingIntent, android.os.Bundle, android.support.v4.app.RemoteInputCompatBase$RemoteInput[])
dex2oatd F 04-02 19:14:00 1307 1307 method_verifier.cc:485] android.support.v4.app.NotificationCompatBase$Action android.support.v4.app.NotificationCompat$Action$1.build(int, java.lang.CharSequence, android.app.PendingIntent, android.os.Bundle, android.support.v4.app.RemoteInputCompatBase$RemoteInput[]) failed to verify: android.support.v4.app.NotificationCompatBase$Action android.support.v4.app.NotificationCompat$Action$1.build(int, java.lang.CharSequence, android.app.PendingIntent, android.os.Bundle, android.support.v4.app.RemoteInputCompatBase$RemoteInput[]): [0x4] returning 'Reference: android.support.v4.app.NotificationCompat$Action', but expected from declaration 'Reference: android.support.v4.app.NotificationCompatBase$Action'
dex2oatd F 04-02 19:14:00 1307 1307 method_verifier.cc:485]
dex2oatd F 04-02 19:14:00 1307 1307 method_verifier.cc:485] Verification error in android.support.v4.app.NotificationCompatBase$Action[] android.support.v4.app.NotificationCompat$Action$1.newArray(int)
dex2oatd F 04-02 19:14:00 1307 1307 method_verifier.cc:485] android.support.v4.app.NotificationCompatBase$Action[] android.support.v4.app.NotificationCompat$Action$1.newArray(int) failed to verify: android.support.v4.app.NotificationCompatBase$Action[] android.support.v4.app.NotificationCompat$Action$1.newArray(int): [0x4] returning 'Reference: android.support.v4.app.NotificationCompat$Action[]', but expected from declaration 'Reference: android.support.v4.app.NotificationCompatBase$Action[]'
dex2oatd F 04-02 19:14:00 1307 1307 method_verifier.cc:485]
dex2oatd F 04-02 19:14:00 1307 1307 method_verifier.cc:485] Verification error in android.support.v4.app.NotificationCompatBase$UnreadConversation android.support.v4.app.NotificationCompat$CarExtender$UnreadConversation$1.build(java.lang.String[], android.support.v4.app.RemoteInputCompatBase$RemoteInput, android.app.PendingIntent, android.app.PendingIntent, java.lang.String[], long)
dex2oatd F 04-02 19:14:00 1307 1307 method_verifier.cc:485] android.support.v4.app.NotificationCompatBase$UnreadConversation android.support.v4.app.NotificationCompat$CarExtender$UnreadConversation$1.build(java.lang.String[], android.support.v4.app.RemoteInputCompatBase$RemoteInput, android.app.PendingIntent, android.app.PendingIntent, java.lang.String[], long) failed to verify: android.support.v4.app.NotificationCompatBase$UnreadConversation android.support.v4.app.NotificationCompat$CarExtender$UnreadConversation$1.build(java.lang.String[], android.support.v4.app.RemoteInputCompatBase$RemoteInput, android.app.PendingIntent, android.app.PendingIntent, java.lang.String[], long): [0x4] returning 'Reference: android.support.v4.app.NotificationCompat$CarExtender$UnreadConversation', but expected from declaration 'Reference: android.support.v4.app.NotificationCompatBase$UnreadConversation'
dex2oatd F 04-02 19:14:00 1307 1307 method_verifier.cc:485]
dex2oatd F 04-02 19:14:00 1307 1307 method_verifier.cc:485] Verification error in android.support.v4.app.RemoteInputCompatBase$RemoteInput android.support.v4.app.RemoteInput$1.build(java.lang.String, java.lang.CharSequence, java.lang.CharSequence[], boolean, android.os.Bundle)
dex2oatd F 04-02 19:14:00 1307 1307 method_verifier.cc:485] android.support.v4.app.RemoteInputCompatBase$RemoteInput android.support.v4.app.RemoteInput$1.build(java.lang.String, java.lang.CharSequence, java.lang.CharSequence[], boolean, android.os.Bundle) failed to verify: android.support.v4.app.RemoteInputCompatBase$RemoteInput android.support.v4.app.RemoteInput$1.build(java.lang.String, java.lang.CharSequence, java.lang.CharSequence[], boolean, android.os.Bundle): [0x4] returning 'Precise Reference: android.support.v4.app.RemoteInput', but expected from declaration 'Reference: android.support.v4.app.RemoteInputCompatBase$RemoteInput'
dex2oatd F 04-02 19:14:00 1307 1307 method_verifier.cc:485]
dex2oatd F 04-02 19:14:00 1307 1307 method_verifier.cc:485] Verification error in android.support.v4.app.RemoteInputCompatBase$RemoteInput[] android.support.v4.app.RemoteInput$1.newArray(int)
dex2oatd F 04-02 19:14:00 1307 1307 method_verifier.cc:485] android.support.v4.app.RemoteInputCompatBase$RemoteInput[] android.support.v4.app.RemoteInput$1.newArray(int) failed to verify: android.support.v4.app.RemoteInputCompatBase$RemoteInput[] android.support.v4.app.RemoteInput$1.newArray(int): [0x4] returning 'Precise Reference: android.support.v4.app.RemoteInput[]', but expected from declaration 'Reference: android.support.v4.app.RemoteInputCompatBase$RemoteInput[]'
dex2oatd F 04-02 19:14:00 1307 1307 method_verifier.cc:485]
dex2oatd F 04-02 19:14:01 1307 1307 compiler_driver.cc:937] Had a hard failure verifying all classes, and was asked to abort in such situations. Please check the log.
[ 75% 9/12] target Package: SelfIntroduce (/opt2/data/p712/p712/out/target/product/tb8788p1_64_bsp/obj/APPS/SelfIntroduce_intermediates/package.apk)
nothing matches overlay file ic_launcher.png, for flavor mdpi-v4
nothing matches overlay file default_ptr_flip.png, for flavor xhdpi-v4
nothing matches overlay file default_ptr_rotate.png, for flavor xhdpi-v4
nothing matches overlay file indicator_arrow.png, for flavor xhdpi-v4
ninja: build stopped: subcommand failed.
19:14:20 ninja failed with: exit status 1
解决:
增加: LOCAL_DEX_PREOPT := false
参考网址: https://www.jianshu.com/p/660e08bb99f6
--来自 xiongyeping share
网友评论