AGP 7.4 issue: Cannot invoke "String.length()" because "<parameter1>" is null

Author: beigiradCreated Mar 13, 2026Updated Mar 17, 2026
Labelsbug

When I want to using the latest version of the library in a project that is using AGP 7.4 it causes this error:

> Task :app:mergeExtDexDebug FAILED
ERROR:~/.gradle/.../transformed/android-gif-drawable-1.2.31-runtime.jar: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null

I've showed this issue in sample project

Different versions test result

1.2.27' // works
1.2.28' // works
1.2.29' // fails
1.2.30' // fails
1.2.31' // fails

P.S: My project is not depend to AGP7 ¯\_(ツ)_/¯ but I've used the android-gif-drawable` in an SDK that should supports AGP7.

Source: koral--/android-gif-drawable