'Compile error in sketch ware after Android 11 update

I'm getting similar error in all my apps (which were working OK) after update (UI 2.0 Android 11) in my realme 5 pro. See error message below:

error: resource android:style/Theme.Material.Light.DarkActionBar not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:5: error: style attribute 'android:attr/colorAccent' not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:6: error: style attribute 'android:attr/colorControlHighlight' not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:7: error: style attribute 'android:attr/colorControlNormal' not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:3: error: style attribute 'android:attr/colorPrimary' not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:4: error: style attribute 'android:attr/colorPrimaryDark' not found. error: resource android:style/Theme.Material.Light.NoActionBar.Fullscreen not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:12: error: style attribute 'android:attr/colorAccent' not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:13: error: style attribute 'android:attr/colorControlHighlight' not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:14: error: style attribute 'android:attr/colorControlNormal' not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:10: error: style attribute 'android:attr/colorPrimary' not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:11: error: style attribute 'android:attr/colorPrimaryDark' not found. error: resource android:style/Theme.Material.Light.NoActionBar not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:19: error: style attribute 'android:attr/colorAccent' not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:20: error: style attribute 'android:attr/colorControlHighlight' not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:21: error: style attribute 'android:attr/colorControlNormal' not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:17: error: style attribute 'android:attr/colorPrimary' not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:18: error: style attribute 'android:attr/colorPrimaryDark' not found. /storage/emulated/0/.sketchware/mysc/632/app/src/main/res/values/styles.xml:24: error: style attribute 'android:attr/windowFullscreen' not found. error: failed linking references.



Solution 1:[1]

This is an issue with Redmi Note 8 series by Xiaomi after upgrading to Android 11. You either want to wait for the release of MIUI 12.5 or downgrade to Android 10.

Solution 2:[2]

I had the same issue and that was when I finally decided to install Sketchware Pro as the original Sketchware was closed and also it's server after a few days. Below are the steps to keep in mind while using Sketchware Pro for your projects. I too fixed this way.

  1. Always use Sketchware Pro 6.4.0 public beta 3. All other versions have bugs and didn't work for me.

  2. Switch to AAPT2 (use settings button next to Run button). No idea why but AAPT doesn't work anymore on SK pro versions. Your problem is based on this step.

  3. Always "Clean temporary files" before Running your project (Use the same above mentioned settings button). This will avoid the unexpected increase in size of your apk and aab files.

This worked for me and will hopefully for you too.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ilyasse Salama
Solution 2 Wakil Ahmad Kaliwal