5

I have decompiled APK using apktool d demoapp.apk then compiling apk using apktool b demoapp.apk but at compile time it throws the error

brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1):

Here No resource identifier found for attribute preserveLegacyExternalStorage in package android

The same error appears for requestLegacyExternalStorage as well

Vishnu
  • 525
  • 2
  • 5
  • 18
Sameer Jani
  • 976
  • 6
  • 14

2 Answers2

1

You should compile against SDK 29 and maybe use the most recent build tools for aapt to know this attribute.

Bogdan Lonchuk
  • 199
  • 1
  • 11
0

If you just want to modify its source before recompile it (resource will not be modified), use -r flag when decompile the apk. I have the same problem, and always get unknown resource problem when recompile it. It solve when I use -r flag when decompile the apk.

# apktool -r d demo.apk
RizaPN
  • 1