I wrote apps whose used AppCompatActivity version 1.2.0 before aapt2.
Now I have to move to aapt2 and simple app with the same library AppCompatActivity 1.2.0 crashed after start with message from logcat
failed resolution of Landroidx/appcompat/R$drawable
I found some posts on the internet but to fix it in Android Studdo developers upgraded gradle plugins, downgraded AppCompat to older version, or upgraded to newer versions, upgraded Android Studio.
I don’t ubnderstand how it works becuse I thought that when i use library all should work the same way.
I tried with simple AppCompaActivity with version 1.2.0, 1.4.1, 1.6 etc… without success.
The application is building buit after start I got : failed resolution of Landroidx/appcompat/R$drawable
I have to do it because as you know when you want to add new app to playstore you need format aab.
I tried my working apk compiled with aapt to decompile and create aab but when app was packed to aab some funcionality work some doesn’t. (we are talking about decompilation and creating aab - the application itself is working fine using ofcourse old version of Remobjecst where exists parameter UseAppt2.
Has anyone dealt with this and had success or only working way is Android Studio with patches in gradle plugins, newer version (one problem have many solutions as I saw in Android Studio environment) ? Is any workaround for this process ??
Ofcourse last version Android Studio with latest gradle plugins is working fine with AppCompacActivity but as I red there are many problems where you are not up to date…
If someone can help, give some info or direction I will be grateful.
maybe @zmattr has any working solution or some direction ?
Actually, with latest (and the new Gradle repository) I get these errors in AAPP2 when using just appcompat-v7. The thing kid, these errors are valid. appcompat-v7-28.0.0 pulls in support-compat-28.0.0, and both of those define these resources.
E: aapt2 link: resource 'color/ripple_material_light' has a conflicting value for configuration (). [/Users/mh/Library/Application Support/RemObjects Software/EBuild/Obj/org.me.androidapplication5-95718CDD32B3A7C8EC42E7AECFCBAE7BF73B7026/Debug/Cooper-Android/aar/support-compat-28.0.0/res/values/values.xml (5)]
H: aapt2 link: originally defined here. [/Users/mh/Library/Application Support/RemObjects Software/EBuild/Obj/org.me.androidapplication5-95718CDD32B3A7C8EC42E7AECFCBAE7BF73B7026/Debug/Cooper-Android/aar/appcompat-v7-28.0.0/res/values/values.xml (59)]
E: aapt2 link: resource 'color/secondary_text_default_material_light' has a conflicting value for configuration (). [/Users/mh/Library/Application Support/RemObjects Software/EBuild/Obj/org.me.androidapplication5-95718CDD32B3A7C8EC42E7AECFCBAE7BF73B7026/Debug/Cooper-Android/aar/support-compat-28.0.0/res/values/values.xml (6)]
H: aapt2 link: originally defined here. [/Users/mh/Library/Application Support/RemObjects Software/EBuild/Obj/org.me.androidapplication5-95718CDD32B3A7C8EC42E7AECFCBAE7BF73B7026/Debug/Cooper-Android/aar/appcompat-v7-28.0.0/res/values/values.xml (61)]
I’m running out of ideas here. the Android tool chain and support libraries are just an inconsistent mess on every level… :(.
I have different issue now with appcompat (which I hacked around locally to test this), which is the duplicate resources (which seems a “valid” error from aapt as far as I can tell, as the two resources it complains about ARE duplicated.
The fix I did should solve the issue of com.android.*.R classes being missing at runtime, causing a crash on launch.
I only tested on Mac. As far as I am concerned, aapt2 is broken on Windows and I don’t know what do do about that (refer to the “device not responding” error from the other thread).
it is no sure efficicnt way but you can zip dir from one aar to one.zip another to second.zip and all linkt together later but as saw in windows you copied all resources to one folder during intermeddiate process… Best approach I saw in Mac in different way but esiaer to read step by step and checking what was going on and what was genereated.