I know there are a number of posts on this but I have tried the tips in all of them and have been banging my head agains this for days now!
I am using Android Studio Koala 2024.1.1.
Part of build.gradle is below.
Part of my manifest is below.
My themes are below.
Despite:
Enabling androidx AND
Trying all the mentioned dependencies in various posts, AND
Being careful to reference themes correctly (and tried @style/ and no @style/ at start of referce) AND
Invalidate cache and restart AND
Clean project
Whenever I try to
Build -> Rebuild Project Or
Build -> Generate Signed APK
I get
ERROR: AAPT: error: resource style/Theme.AppCompat.Light.NoActionBar (aka org.gearlog.app:style/Theme.AppCompat.Light.NoActionBar) not found.
error: failed linking references.
Supporting info:
build.gradle (app) dependencies (I know this is too many – just showing all that I have tried!):
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:0.68.2"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation "androidx.appcompat:appcompat:1.7.0"
implementation "androidx.appcompat:appcompat-resources:1.7.0"
}
AndroidManifest part:
<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:theme="@style/SplashTheme"
Themes
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:textColor">#000000</item>
<item name="android:statusBarColor">@color/app_bg</item>
<item name="android:windowLightStatusBar">false</item>
<item name="android:windowBackground">@color/app_bg</item>
<item name="android:editTextBackground">@android:color/transparent</item>
</style>
<style name="SplashTheme" parent="AppTheme">
<item name="android:statusBarColor">@color/splashscreen_bg</item>
<item name="android:windowBackground">@drawable/splash_screen</item>
<item name="android:windowLightStatusBar">false</item>
</style>
If anyone could help I would be SO grateful!