I keep getting this message on all of my projects which were previously working as of yesterday: "Error running 'app': Default Activity not found"
Sorry, I've read similar posts with the same issue but haven't figured out a solution. It's not the Manifest files because I've compared them to the ones in other posts. I've pulled up two projects from about a week ago and those won't work now either.
Build --> Clean Project didn't work.
I've also tried this two or three times: File---->Invalidate Caches/Restart. Click on it and choose Invalidate Caches/Restart
I installed an update yesterday. I'm not sure what to do, I'd appreciate any help/feedback. I'm new to android studio, so please feel free to over simplify lol. :)
Here's the code I have in the AndroidManifest.xml through a project I made through a Udacity course. This one has the same error as the other projects:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.birthdaycard">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Here's the Android Manifest file from a new project (comparing two toys - yes, I'm an adult who collects toys lol) same issue:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.example.newapplication">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".BarbieOne">
</activity>
<activity android:name=".BarbieTwo">
</activity>
</application>
Here's the build.gradle (Module:app) for the same project - Sorry, not sure if this was the right build gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "android.example.newapplication"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-
optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.2'
}