Android Studio Cannot Resolve Symbol Appcompatactivity Solutions

Discussion in 'Virus, Trojan, Spyware, and Malware Removal' started by securityhope, Aug 16, 2016.

  1. securityhope

    securityhope Administrator Staff Member

    Joined:
    Aug 3, 2016
    Messages:
    1,241
    Likes Received:
    0
    Trophy Points:
    36
    Cannot Resolve Appcompatactivity

    Android Studio does not recognize the other classes in the same package, it appears in red, however, compile without problems. Displayed after the mouse up there "Cannot resolve symbol XXX", restart Android Studio, sync gradle,Clean build again to no avail.

    An error occurred mostly because before Android Studio, some setting problems. Solution is as follows:

    Click the menu "File"-> "Invalidate Caches/Restart", and then clicking the dialog box "Invalidate and Restart", emptying the cache and rebooting. Syntax will be highlighted correctly.

    "The import android.support.v7 cannot be resolved" and "ActionBarActivity cannot be resolved to a type"

    It's a common error "The import android.support.v7 cannot be resolved" on import android.support.v7.app.ActionBarActivity; and "ActionBarActivity cannot be resolved to a type" on extends ActionBarActivity. It may be various reason to cause it. One of the reason is the auto-generated project appcompat_v7 closed.



    Cannot resolve symbol 'AppCompatActivity'

    Sometimes clearing the android studio caches help.

    In android studio I just cleared the caches and restarted with the following option--

    File->Invalidate Caches/Restart

    Searches related to cannot resolve symbol appcompatactivity

    cannot resolve symbol activitycompat
    android.support.v7.app.appcompatactivity jar download

    cannot resolve symbol support android studio
    appcompatactivity error
    what is
    appcompatactivity
    how to change dependencies in android studio
    appcompatactivity vs activity
     
    Last edited: Mar 10, 2017

Share This Page

Share