From f5632e8f70086a67df7930c593f325f7159333ed Mon Sep 17 00:00:00 2001 From: Mathieu Rul Date: Thu, 11 Apr 2024 20:49:25 +0200 Subject: [PATCH] Check for empty entry values Fix an issue with AGP version 8.3 --- lib/apktools/apkresources.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/apktools/apkresources.rb b/lib/apktools/apkresources.rb index 0085ed1..aae5ec1 100755 --- a/lib/apktools/apkresources.rb +++ b/lib/apktools/apkresources.rb @@ -239,7 +239,7 @@ def get_resource_key(res_id, xml_format=false) end entry = res_spec.types.entries[res_index] - if entry == nil + if entry == nil || entry.values.empty? # There is no entry in our table for this resource puts "Could not find #{res_spec.types.id} ResType chunk" if DEBUG return nil