Showing results for 
Show  only  | Search instead for 
Did you mean: 

android instrumentation - finished with non-zero exit value 5


---18.680 FINE: APKit-C(1): Instrumenting all packages (for 3rd partyweb requests): true

---18.681 INFO: APKit-AdkInstrumentor(1): Dynatrace Auto-Instrumentation version for Android

---18.682 FINE: APKit-AdkInstrumentor(1): Unpacking APK and updating AndroidManifest.xml ...

---18.690 FINE: APKit-aG(14): ProcessStreamReader begins ...

---19.055 FINE: APKit-aG(14): ---18 AM brut.androlib.ApkDecoder decode

---19.055 FINE: APKit-aG(14): INFO: Using Apktool 2.3.3-ecb117-SNAPSHOT on app.apk

---19.075 FINE: APKit-aG(14): ---19 AM brut.androlib.res.AndrolibResources loadMainPkg

---19.075 FINE: APKit-aG(14): INFO: Loading resource table...

---19.652 FINE: APKit-aG(14): ---19 AM brut.androlib.res.AndrolibResources decodeManifestWithResources

---19.653 FINE: APKit-aG(14): INFO: Decoding AndroidManifest.xml with resources...

---19.668 FINE: APKit-aG(14): ---19 AM brut.androlib.res.AndrolibResources getFrameworkDir

---19.669 FINE: APKit-aG(14): SEVERE: WARNING: Could not write to (/Users/---/Library/apktool/framework), using /var/folders/z8/xmqgl87x7fnb91f7m34dw8300000gq/T/ instead...

---19.669 FINE: APKit-aG(14): ---19 AM brut.androlib.res.AndrolibResources getFrameworkDir

---19.670 FINE: APKit-aG(14): SEVERE: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable

---19.712 FINE: APKit-aG(14): ---19 AM brut.androlib.res.AndrolibResources loadFrameworkPkg

---19.713 FINE: APKit-aG(14): INFO: Loading resource table from file: /var/folders/z8/xmqgl87x7fnb91f7m34dw8300000gq/T/1.apk

---24.178 FINE: APKit-aG(14): ---24 AM brut.androlib.res.AndrolibResources adjustPackageManifest

---24.179 FINE: APKit-aG(14): INFO: Regular manifest package...

---24.180 FINE: APKit-aG(14): ---24 AM brut.androlib.res.AndrolibResources decode

---24.181 FINE: APKit-aG(14): INFO: Decoding file-resources...

---25.324 FINE: APKit-aG(14): ---25 AM sun.awt.SunDisplayChanger notifyListeners

---25.324 FINE: APKit-aG(14): FINEST: notifyListeners

---27.907 FINE: APKit-aG(14): Exception in thread "main" java.lang.NullPointerException

---27.908 FINE: APKit-aG(14): at java.base/java.util.regex.Matcher.getTextLength(

---27.909 FINE: APKit-aG(14): at java.base/java.util.regex.Matcher.reset(

---27.909 FINE: APKit-aG(14): at java.base/java.util.regex.Matcher.<init>(

---27.909 FINE: APKit-aG(14): at java.base/java.util.regex.Pattern.matcher(

---27.909 FINE: APKit-aG(14): at<init>(

---27.910 FINE: APKit-aG(14): at<init>(

---27.910 FINE: APKit-aG(14): at

---27.910 FINE: APKit-aG(14): at brut.androlib.res.decoder.ResAttrDecoder.decode(

---27.910 FINE: APKit-aG(14): at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(

---27.911 FINE: APKit-aG(14): at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(

---27.911 FINE: APKit-aG(14): at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(

---27.911 FINE: APKit-aG(14): at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(

---27.915 FINE: APKit-aG(14): at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(

---27.916 FINE: APKit-aG(14): at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(

---27.918 FINE: APKit-aG(14): at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(

---27.918 FINE: APKit-aG(14): at brut.androlib.res.decoder.ResFileDecoder.decode(

---27.919 FINE: APKit-aG(14): at brut.androlib.res.decoder.ResFileDecoder.decode(

---27.920 FINE: APKit-aG(14): at brut.androlib.res.AndrolibResources.decode(

---27.921 FINE: APKit-aG(14): at brut.androlib.Androlib.decodeResourcesFull(

---27.922 FINE: APKit-aG(14): at brut.androlib.ApkDecoder.decode(

---27.922 FINE: APKit-aG(14): at brut.apktool.Main.cmdDecode(

---27.922 FINE: APKit-aG(14): at brut.apktool.Main.main(

---31.731 FINE: APKit-aG(14): ProcessStreamReader finished

---31.732 FINE: APKit-aG(1): syncExecProcess rc=1

---31.733 SEVERE: APKit-AdkInstrumentor(1): extracting the apk failed rc = 1

Throwable occurred: aC: extracting the apk failed rc = 1

at aG.a(SourceFile:199)

at aG.a(SourceFile:155)

at aG.a(SourceFile:150)

at v.a(SourceFile:142)

at e.f(SourceFile:181)

at e.<init>(SourceFile:88)

at a.<init>(SourceFile:27)




I see that there are errors that relates to Pattern and Matcher, but I don't think that is in my code right? Because I have been using that in the previous apk builds and I did not get this error before. Any help would be appreciated, thank you.


Dynatrace Champion
Dynatrace Champion

Hey Alvin,

The auto-instrumentor was not able to read a file successfully. Based on the reported stacktrace it is not possible to determine which value in which file the auto-instrumentor was not able to determine.

Normally, we would recommend to create a support ticket with the debug logs. But in this case it is different, because you are using version 7.x.

We strongly recommend to upgrade to version 8.x. This version contains several new features and improvements. Auto-instrumentation works differently in version 8.x compared to version 7.x and will not be affected by the reported problem.

official documentation:

migration page:

Featured Posts