Skip to content

Support APK built with AGP version 8.3#28

Merged
devunwired merged 1 commit intodevunwired:masterfrom
mathroule:support-agp-8.3
May 3, 2024
Merged

Support APK built with AGP version 8.3#28
devunwired merged 1 commit intodevunwired:masterfrom
mathroule:support-agp-8.3

Conversation

@mathroule
Copy link
Contributor

@mathroule mathroule commented Apr 11, 2024

Context

When parsing an APK built with AGP version 8.3, APK Resource Toolkit raise an error:

undefined method 'key' for nil:NilClass

      return "@#{res_spec.id}/#{entry.values[0].key}"
                                               ^^^^
/vendor/bundle/ruby/3.1.0/gems/apktools-0.7.4/lib/apktools/apkresources.rb:250:in 'get_resource_key'
/vendor/bundle/ruby/3.1.0/gems/apktools-0.7.4/lib/apktools/apkxml.rb:241:in 'parse_xml'

This issues does not happen when parsing an APK built with AGP version 8.2.2.

Changes

  • Check if entry values is not empty

@mathroule mathroule changed the title Check for empty entry values Support APK built with AGP version 8.3 Apr 11, 2024
Fix an issue with AGP version 8.3
@devunwired devunwired merged commit 185769c into devunwired:master May 3, 2024
@devunwired
Copy link
Owner

Thanks for your contribution! As you might have noticed, I don't maintain this codebase much anymore. However, I'll see if I can find some time in the next few days to publish a new gem version with this update.

@mathroule mathroule deleted the support-agp-8.3 branch May 4, 2024 19:36
@mathroule mathroule restored the support-agp-8.3 branch May 4, 2024 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants