Build complete and running but showing error on class android
- Remove the lines and re-import them from correct/compatible packages.
- Try removing all dependencies then sync and add all dependencies again then sync.
As you mentioned in comments nimi0112 and Ali Ahmed's your answer is really helped me a lot.
Gradle build error: Failed to resolve:
From the SDK manager, make sure you have both the Android Support Repository and Google Repository installed and up to date. You should then be able to find the relevant artifacts in sub folders of your /extras/android/m2repository directory
Gradle build error in Android Studio 3.1.3.2
The default gradle install is part of Android Studio sdk so if you moved your Android Studio files location or have the wrong PATH defined in your environment it won't find the sdk location like this. If your path is to a different android studio installation version it might not have that particular version of gradle in it.
Android Studio and Gradle build error
If you are using the Gradle Wrapper (the recommended option in Android Studio), you enable stacktrace by running gradlew compileDebug --stacktrace
from the command line in the root folder of your project (where the gradlew
file is).
If you are not using the gradle wrapper, you use gradle compileDebug --stacktrace
instead (presumably).
You don't really need to run with --stacktrace
though, running gradlew compileDebug
by itself, from the command line, should tell you where the error is.
I based this information on this comment:
Android Studio new project can not run, throwing error
Related Topics
Margins of a Linearlayout, Programmatically with Dp
Set Visibility of Progress Bar Gone on Completion of Image Loading Using Glide Library
Phone Number Validation Android
How to Change The Overscroll Color in Android 2.3.1
Exception When Opening Parse Push Notification
Register Receiver in a Service
How to Generate The Aac Adts Elementary Stream with Android Mediacodec
Android How to Wait Until a Service Is Actually Connected
How to Scale a Streaming Bitmap In-Place Without Reading The Whole Image First
Remove Unwanted White Space in Webview Android
Using Audiotrack in Android to Play a Wav File
Android Studio and Gradle Build Error
Stuck with Gradle Build Running
Android - Reduce Image File Size
Gradle Sync Failed: Failed to Find Build Tools Revision 24.0.0 Rc1
Android Sdk Install: Java Se Development Kit (Jdk) Not Found