I am new to developing on Android Studio, my app was running fine until the studio exited abruptly after that the project cannot find any of the libraries imported (in asterisks) like Uri
, AppCompatActivity
etc to my AppCompatActivity
class (I am using Android 2.1.2)
import android.net.*Uri*;
import android.os.*Bundle*;
import android.support.v7.*;
import android.util.*Log*;
import android.view.*View*;
import android.widget.*AdapterView*;
import android.widget.*ListView*;
import com.google.android.gms.appindexing.*Action*;
import com.google.android.gms.appindexing.*AppIndex*;
import com.google.android.gms.common.api.*GoogleApiClient*;
import org.xmlpull.v1.*XmlPullParser*;
import org.xmlpull.v1.*XmlPullParserException*;
import org.xmlpull.v1.*XmlPullParserFactory*;
import java.io.*IOException*;
import java.io.*InputStream*;
import java.util.*ArrayList*;
import java.util.*List*;
public class Menu extends android.support.v7.app.*AppCompatActivity* {
What I have tried uptil now:
- checked projectstructure -> app -> dependencies
tried sequencing the libs
com.android.support:appcompat-v7:24.2.1 com.google.android.gms:play-services-appindexing:8.1.0 before junit:junit:4.12
Checked build.gradle and added above 2 dependencies
- Clean Project
- Build APK
- ReBuild Project (many times)
P.S: com.google.android... imports were auto generated with onstart and onstop overrides (no idea why)
// ATTENTION: This was auto-generated to implement the App Indexing API.
// See https://g.co/AppIndexing/AndroidStudio for more information.
client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
P.S: My Android Studio is installed in C:/Programfiles and my project is saved in a different location under AndroidStudioProjects folder