Error compiling or rebuild my project

1

a query, what happens is that when you want to compile my project or rebuild and this error appears and the process does not end.

Information:Gradle tasks [clean, :app:assembleDebug]
C:\Users\a_sua\OneDrive\Documentos\PROYECTOS\PubEat\app\src\main\java\pubeat\app\version1_0\MuroNegocio.java
Error:(15, 8) error: cannot access ActionBarActivity
class file for android.support.v7.app.ActionBarActivity not found
Error:(21, 5) error: method does not override or implement a method from a supertype
Error:(23, 9) error: cannot find symbol variable super
Error:(24, 9) error: cannot find symbol method setContentView(int)
Error:(25, 9) error: cannot find symbol method setDragEdge(DragEdge)
Error:(28, 34) error: cannot find symbol method findViewById(int)
Error:(29, 53) error: cannot find symbol method getSupportFragmentManager()
Error:(31, 32) error: cannot find symbol method findViewById(int)
Error:(40, 50) error: cannot find symbol variable this
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
 Compilation failed; see the compiler error output for details.
Information:BUILD FAILED in 25s
Information:10 errors
Information:0 warnings
Information:See complete output in console
    
asked by Andressualu 19.12.2017 в 01:25
source

2 answers

1

You have to add the Android Support Appcompat V7 libraries to your compilation. Edit your build.gradle and put something like this in the dependencies section:

compile 'com.android.support:appcompat-v7:23.2.0'

The number 23.2.0 changes regularly. Android Studio is going to offer you the newest version in the tooltip.

    
answered by 19.12.2017 в 14:47
-1

In your project you use class ActionBarActivity , which is obsolete , it can only be used if you use the dependency of this latest version, but which is not recommended :

compile 'com.android.support:appcompat-v7:22.0.0'

The correct thing to do is to change to AppCompatActivity

The reason you get the message:

  

class file for android.support.v7.app.ActionBarActivity not found

is simply because it no longer exists in the latest versions of the support library.

    
answered by 19.12.2017 в 17:40