Open agvale opened 4 years ago
this happens since the 2.0.3 update:
$p = new \ApkParser\Parser('some-apk-file.apk');
$l = $p->getManifest()->getApplication()->getLabel();
var_dump($p->getResources($l));
in 2.0.2, this returns an array with one element containing the application name. In 2.0.3, this returns false.
according to git bisect, this was caused by 1282c68f8d48536243367bb380569d53b7ff0bc3. I'll make a PR to fix this
never mind - this was just a config change.
instantiate \ApkParser\Parser with ['manifest_only' => false]
as its config argument to restore the previous behavior.
Maybe the release notes for 2.0.3 should be updated.
Hi everyone, I'm also getting this error right now. Here is my code to get the label:
$labelResourceId = $apk->getManifest()->getApplication()->getLabel(); // result: 0x7f0f0065
$label = $apk->getResources($labelResourceId);
$label return false
.
=((
I have tried with a number of different apk files and have the same results as above.
Please help me. Thanks
我提交的那个拉取请求就是解决这个问题的,你可以试下
never mind - this was just a config change.
instantiate \ApkParser\Parser with
['manifest_only' => false]
as its config argument to restore the previous behavior.Maybe the release notes for 2.0.3 should be updated.
This helped. Thank you for pointing this out. I created a PR https://github.com/tufanbarisyildirim/php-apk-parser/pull/99 just to add this config to the example codes
when i user getResources returns nil , but i use the apk in examples it works well.