question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] error: No resource identifier found for attribute 'allowNativeHeapPointerTagging' in package 'android' when decompiling and rebuilding

See original GitHub issue

Information

  1. Apktool Version (apktool -version) - 2.6.0
  2. Operating System (Mac, Linux, Windows) - Mac
  3. APK From? (Playstore, ROM, Other) - Other

Stacktrace/Logcat

I: Using Apktool 2.6.0 on app.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /Users/administrator/Library/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Baksmaling assets/audience_network.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
I: Using Apktool 2.6.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_assets folder into assets.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether resources has changed...
I: Building resources...
W: /Users/administrator/Downloads/app/AndroidManifest.xml:30: error: No resource identifier found for attribute 'allowNativeHeapPointerTagging' in package 'android'
W: 
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/var/folders/bd/dy0ydf6j2m76yg9pqs66xlkh0000gn/T/brut_util_Jar_20300348832377290397088723987002600988.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 30, --version-code, 7925, --version-name, 2.7.3, --no-version-vectors, -F, /var/folders/bd/dy0ydf6j2m76yg9pqs66xlkh0000gn/T/APKTOOL6231971702294544276.tmp, -e, /var/folders/bd/dy0ydf6j2m76yg9pqs66xlkh0000gn/T/APKTOOL3503922786815494529.tmp, -0, arsc, -I, /Users/administrator/Library/apktool/framework/1.apk, -S, /Users/administrator/Downloads/app/res, -M, /Users/administrator/Downloads/app/AndroidManifest.xml]

Steps to Reproduce

  1. apktool d app.apk
  2. apktool b app

APK

The APK cannot be shared publicly.

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? Yes.
  2. If you are trying to install a modified apk, did you resign it? Not trying to install a modified apk, just trying to decompile and rebuild.
  3. Are you using the latest apktool version? Yes, 2.6.0.

The change we made to our app which triggered this issue was adding android:allowNativeHeapPointerTagging="false" to the main AndroidManifest before building. The build succeeds, but the decompile+rebuild fails. This is a Unity app.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
JoeyRosickacommented, Apr 15, 2022

Hello, have you been able to fix it the issue of app crashing with Targeted SDK 30? I am stuck at the same issue.

@Original-Tasty I took another look at this and was able to find a solution. Here’s what I did:

  1. Update to the latest version of apktool with brew
  2. Install API level 30 (or higher) of the Android SDK through Android Studio
  3. Delete ~/Library/apktool/framework
  4. Re-run apktool commands

I believe the issue was that the apk that got generated when running apktool needed to be regenerated after updating apktool and installing the proper version of the Android SDK.

0reactions
GuillianSeedcommented, Jun 6, 2022

Hello, have you been able to fix it the issue of app crashing with Targeted SDK 30? I am stuck at the same issue.

@Original-Tasty I took another look at this and was able to find a solution. Here’s what I did:

1. Update to the latest version of apktool with brew

2. Install API level 30 (or higher) of the Android SDK through Android Studio

3. Delete ~/Library/apktool/framework

4. Re-run apktool commands

I believe the issue was that the apk that got generated when running apktool needed to be regenerated after updating apktool and installing the proper version of the Android SDK.

@JoeyRosicka I’m on windows, where is the apktool/framework directory?

Users\xxxx\AppData\Local\apktool\framework

Read more comments on GitHub >

github_iconTop Results From Across the Web

No resource identifier found for attribute ****** when wrapping ...
We tried to use managed-app-utility.jar from the MAM SDK to wrap our Android app, but it gives us the following errors:.
Read more >
iBotPeaches/Apktool - Gitter
AndroidManifest.xml:43: error: No resource identifier found for attribute 'requestLegacyExternalStorage' in package 'android'.
Read more >
java - Error: No resource identifier found for attribute ...
I have the same problem, and always get unknown resource problem when recompile it. It solve when I use -r flag when decompile...
Read more >
Apktool.jar common errors and solutions - XDA Forums
No resource identifier found for attribute 'isSplitRequired' in package 'android' Split APK is not supported yet.
Read more >
AndroidManifest.xml:19: error: No resource identifier found for ...
Android Question AndroidManifest.xml:19: error: No resource identifier ... found for attribute 'networkSecurityConfig' in package 'android'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found