Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android 33 - issues in manifest and layout files in Android Studio

Currently in my Android app I have targetSdkVersion 32 and in my AndroidManifest.xml file I have:

<application
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_nameshort"
    android:supportsRtl="false"
    android:theme="@style/AppTheme">
    
    <activity android:name=".MainActivity"
        android:screenOrientation="portrait"
        tools:ignore="LockedOrientationActivity"
        android:windowSoftInputMode="adjustPan"
        android:exported="true">

Everything is fine and working well.

However now when I am updating my app, Android Studio (Chipmunk | 2021.2.1) suggests to use targetSdkVersion 33. After I do that, there are issues in AndroidManifest.xml:

unknown attribute android:supportsRtl
unknown attribute android:screenOrientation
unknown attribute android:windowSoftInputMode 

and also multiple issues in XML layout files. e.g.:

unknown android:contentDescription
unknown android:layout_toEndOf

and much more...

I already tried to invalidate caches, rebuild the project, nothing helps. Only switching back to target version 32 helps. Are those attributes really deprecated or is there any issue? It doesn't say deprecated, just unknown.

I also deleted physically the files from cache folders, I also reinstalled the API 33 SDK, nothing helped.

I even reinstalled Android Studio, with no luck. Seems something is wrong with API 33 vs Android Studio.

like image 338
Darksymphony Avatar asked Sep 01 '25 17:09

Darksymphony


1 Answers

According to this issue tracker bug, Android Studio Chipmunk before Patch 2 does not support Android 13. Patch 2 did seemingly add support. However, Android Studio Chipmunk does not have support for Android Gradle Plugin 7.3.0-beta05, which is also required for Android 13 support.

On my end, I've found doing this will work:

  1. Switch to Android Studio Electric Eel (Yes, the Canary version). I would say to switch to Dolphin, but that has apparently not been patched to have Android 13 support yet.
  2. Upgrade the AGP version to 7.4.0-alpha09, which supports Android 13. I would upgrade to 7.3.0-beta05, but Electric Eel does not support that version.

This probably isn't the best solution for most people, but if you are willing to tolerate unstable versions of development tools it should be fine.

Edit: Android Studio Dolphin should work now. Use that.

like image 139
ntorstio Avatar answered Sep 04 '25 06:09

ntorstio