sallu-tech
sallu-tech

Reputation: 77

AAPT: error: resource android:attr/popupPromptView is private

I am using actionbarsherlock library in my android app and I am using one of its style attribute with the name of popupPromptView but when I try to generate the apk for my app, it gives me this error:

C:\Users\My Username\.gradle\caches\transforms-2\files-2.1\fa481916e694bf5a6973eb98ad535c2d\jetified-actionbarsherlock-4.4.0\res\values\values.xml:268:5-296:25: AAPT: error: resource android:attr/popupPromptView is private.

I tried going to this values.xml file and comment out this style attribute but when I try to generate the apk again, that line which I commented comes back again. I don't know what's wrong. I have even tried deleting the cache folder of .gradle but still no luck.

Upvotes: 0

Views: 1389

Answers (2)

chizztectep
chizztectep

Reputation: 1

it made my day https://developer.android.com/studio/command-line/aapt2

In previous versions of AAPT, the compiler would silently ignore foregroundInsidePadding attributes when you define it with the android namespace. When using AAPT2, the compiler catches this early and throws the following build error:

Error: (...) resource android:attr/foregroundInsidePadding is private To resolve this issue, simply replace android:foregroundInsidePadding with foregroundInsidePadding.

Upvotes: 0

Damiano Fasoli
Damiano Fasoli

Reputation: 11

I had the same problem

You can solve downloading Sherlock as a module itself to compile together with your project (I imported the Sherlock modules from a Eclipse project) instead of using a library reference

In this way you can remove that line in a definitive way

Upvotes: 1

Related Questions