I have strange situation that has hapenned with me twice.
I have manifest inside my main module - igs_main
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" package="com.example">
<application
android:name=".CommonApplication"
android:allowBackup="false"
android:label="@string/app_name"
android:hardwareAccelerated="true"
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/AppTheme"
android:supportsRtl="false"
tools:replace="android:supportsRtl,android:allowBackup"
tools:ignore="GoogleAppIndexingWarning, UnusedAttribute, RtlSupport">
<activity android:name=".auth.view.SplashScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
When I'm trying to launch my app it looks like

And I getting an error :

I tried specify directly my default Activity, but AS said that this activity is not declared in Manifest.

Invalidate Caches and Restart AS and Rebuild the project, but it also didn't help me.So, I waste all possible solutions. Who knows how it can be fixed?
I don't know why it can be linked to this problem, but the reason of this problem comes from Kotlin Compiler. When I launched Kotlin compiler options I saw warning and after few seconds of googling I found an answer which described here - https://stackoverflow.com/a/50912853/4969827.
After changing useProjectSettings to true all became work properly!
To prevent information loss I copy-paste original snippet to here.
<facet type="kotlin-language" name="Kotlin">
<configuration version="3" platform="JVM 1.6" useProjectSettings="true">
<compilerSettings />
<compilerArguments>
<option name="destination" value="$MODULE_DIR$/build/tmp/kotlin-classes/debug" />
<option name="noStdlib" value="true" />
<option name="noReflect" value="true" />
<option name="moduleName" value="app_debug" />
<option name="addCompilerBuiltIns" value="true" />
<option name="loadBuiltInsFromDependencies" value="true" />
<option name="languageVersion" value="1.2" />
<option name="apiVersion" value="1.2" />
...
</compilerArguments>
</configuration>
</facet>
However problems continue came up. More seldom, but came. Some day I was editing xml files and I found broken APPT. So the problem was in SDK, which I deleted and installed again. After this all works fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With