FolioReader-Android icon indicating copy to clipboard operation
FolioReader-Android copied to clipboard

AAPT: error: resource android:attr/android:progressBarStyle not found

Open zhirshya opened this issue 7 years ago • 13 comments

FolioReader version - 0.5.4 FolioReader Stock / Modified - Stock.

Android SDK - minSdkVersion 21, targetSdkVersion 29

Mobile / Tablet / Emulator Info - This is a build error.

Crash / Error - ~/.gradle/caches/transforms-2/files-2.1/3b37d1e20c2d569e237caae59c970fe0/folioreader-0.5.4/res/layout/progress_dialog.xml:13: AAPT: error: resource android:attr/android:progressBarStyle not found.

Steps to reproduce / Describe in detail - Add "implementation 'com.folioreader:folioreader:0.5.4'" in application build.gradle, but haven't added any code that uses it, and the error disappears upon commenting out "implementation 'com.folioreader:folioreader:0.5.4'".

AndroidStudio 3.5 ext.kotlin_version = '1.3.41' classpath 'com.android.tools.build:gradle:3.5.0'.

zhirshya avatar Aug 26 '19 09:08 zhirshya

@zhirshya

Try this

Module:app

dependencies { configurations.matching { it.name == '_internal_aapt2_binary' }.all { config -> config.resolutionStrategy.eachDependency { details -> details.useVersion("3.3.2-5309881") } } }

KishanViramgama avatar Aug 29 '19 06:08 KishanViramgama

@zhirshya Try this android:attr/progressBarStyle instead of "android:attr/android:progressBarStyle"

shabana0508 avatar Sep 30 '19 06:09 shabana0508

thanks you very match for solution :
add to build.gradle :

dependencies { implementation "com.folioreader:folioreader:0.5.4" implementation 'com.android.support:multidex:1.0.3' // ( for androidx) configurations.matching { it.name == '_internal_aapt2_binary' }.all { config -> config.resolutionStrategy.eachDependency { details -> details.useVersion("3.3.2-5309881") } } }

ahmedProgrammation avatar Oct 06 '19 14:10 ahmedProgrammation

Thanks everyone, configurations.matching { it.name == '_internal_aapt2_binary' }.all { config -> config.resolutionStrategy.eachDependency { details -> details.useVersion("3.3.2-5309881") } } solved the issue I had.

zhirshya avatar Oct 28 '19 07:10 zhirshya

same problem. I'm using flutter, so I don't understand this solution. Can't you just fix the code?

sgehrman avatar Mar 26 '20 12:03 sgehrman

hello, i used the solution to make it work, but any final solution?

voipworld avatar Jun 14 '20 00:06 voipworld

Tried above suggested solution unfortunately it ended while building with:

AAPT: unknown option '--proguard-minimal-keep-rules'.

aapt2 link [options] -o arg --manifest arg files...

Options: -o arg Output path. --manifest arg Path to the Android manifest to build. -I arg Adds an Android APK to link against. -A arg An assets directory to include in the APK. These are unprocessed. -R arg Compilation unit to link, using overlay semantics. The last conflicting resource given takes precedence. --package-id arg Specify the package ID to use for this app. Must be greater or equal to 0x7f and can't be used with --static-lib or --shared-lib. --java arg Directory in which to generate R.java.

washeeeq avatar Aug 16 '20 08:08 washeeeq

This workaround used to work for me, but after upgrading Android Studio I get the same "--proguard-minimal-keep-rules" error as @washeeeq .

Creating the progress_dialog.xml file from the solution in #406 worked for me. I removed the "configurations.matching{}" workaround, too.

Yahoo-Mike avatar Sep 09 '20 11:09 Yahoo-Mike

I also get the "--proguard-minimal-keep-rules" error. Have tried the solution to #406 with no luck.

If I change style="?android:attr/android:progressBarStyle" to "style="?android:attr/progressBarStyle", it simply changes back when the app is built and gives the same error.

Any ideas?

sdilizio avatar Dec 09 '20 05:12 sdilizio

I also get the "--proguard-minimal-keep-rules" error. Have tried the solution to #406 with no luck.

If I change style="?android:attr/android:progressBarStyle" to "style="?android:attr/progressBarStyle", it simply changes back when the app is built and gives the same error.

Any ideas?

Hey did u manage to solve it ? i'm facing the same problem :(

y-ziane avatar Dec 27 '20 23:12 y-ziane

y-ziane, believe I tried just replacing the code as per #406, and this didn't work. When I properly deleted the original progress_dialog.xml and then recreated it with the code, I think that's when it worked for me.

sdilizio avatar Jan 08 '21 07:01 sdilizio

thanks you very match for solution : add to build.gradle :

dependencies { implementation "com.folioreader:folioreader:0.5.4" implementation 'com.android.support:multidex:1.0.3' // ( for androidx) configurations.matching { it.name == '_internal_aapt2_binary' }.all { config -> config.resolutionStrategy.eachDependency { details -> details.useVersion("3.3.2-5309881") } } }

The above solution together with #406 fixed the issue for me

VictorKabata avatar Aug 13 '21 10:08 VictorKabata

In build.gradle (:app) dependencies { configurations.matching { it.name == '_internal_aapt2_binary' }.all { config -> config.resolutionStrategy.eachDependency { details -> details.useVersion("3.3.2-5309881") } } }

Hello, I use this solution in my project, but it still leads to such an error. I suffer a lot of time, help me pls.

ERROR:C:\Users\Vlad.gradle\caches\transforms-3\c9df99c4345292133a8da2f8096f1b5a\transformed\jetified-folioreader-0.5.4\res\layout\progress_dialog.xml:17: AAPT: error: resource android:attr/android:progressBarStyle not found.

Ader0m avatar Nov 11 '21 15:11 Ader0m