I got an error "Cannot resolve symbol MainActivity" on this code.
<activity
android:name=".MainActivity" //here
android:label="@string/app_name"
android:launchMode="singleTask" >
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="MainActivity"
android:scheme="callback" />
</intent-filter>
</activity>
Needless to say , MainActivity inherits Activity and package name is correct too.
Why?
Thank you
Here's an image of the directory structure.
Clean Caches
File -> Invalidate Caches / Restart...
It's possible that your 'src' directory isn't set as a source directory?
Your IDE seems to be seeing your com.example.fovoapp as a simple directory structure instead of a package. Also looking at your linked image, the little "J" on the java files tells me that also. When a java file is set as source usually it shows up as a Class "C".
I could be wrong but make sure you set your src directory as source and that should fix the issue.
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