This question already has answers here:
Android Studio - local path doesn't exist
(28 answers)
Closed 6 years ago.
When i run application on my connected device, after selecting an device it shows unexpected error,local path doesn't exist.
In build.gradle check if gradle is updated to latest.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
}
}
After that clean and rebuild your project.
Related
This question already has answers here:
Gradle DSL method not found: 'implementation()'
(9 answers)
How to fix "ERROR: Gradle DSL method not found" on Android Studio 3.3
(2 answers)
Closed 3 years ago.
I was working on a react native app and I installed react-navigation library and its dependencies. then after I tried to run my app using Android Studio I get this error:
ERROR: Gradle DSL method not found: 'implementation()'
Possible causes:
The project 'MealApp' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper file
The build file may be missing a Gradle plugin.
Apply Gradle plugin
I changed nothing and this error just poped up. What should I do to get rid of this annoying thing?
the implementation is support in the Gradle version after 3. try to change it in the android/build.gradle as the following
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
At the same time, change the gradle-wrapper.properties Gradle version
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
This question already has answers here:
Failed to resolve: com.android.support:cardview-v7:26.0.0 android
(26 answers)
Closed 5 years ago.
After adding lottie to build.gradle file saying Error:Failed to resolve: com.android.support:appcompat-v7:26.1.0
Install Repository and sync project
Open File
Show in Project Structure dialog
Make sure you're including maven repo in your root build.gradle e.g.
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
This question already has answers here:
Failed to resolve: com.android.support:cardview-v7:26.0.0 android
(26 answers)
Failed to resolve com.google.android.gms play-services-auth:11.4.0
(13 answers)
Failed to resolve: com.google.firebase:firebase-core:11.2.0
(6 answers)
Closed 5 years ago.
I have updated parts of the Android sdk and now I can use newer versions of my libraries but the gradle file doesn't accept them. Can you help me pls?
That one is the only projects where it get an error, that's why I think it gets the error 'cause of a local project file.
I got a failed to resolve error at each library
I use some of Google firebase (11.2.0) ;support:appcompat-v7(26.0.2); support:design (26.0.2)
Android studio says me that are the newest versions for my project.
Play services and Firebase dependencies are now available via maven.google.com with the release of version 11.2.0 of Google Play services and Firebase.
Add maven { url "https://maven.google.com" } to your root level build.gradle file
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
For more information please check official doc
This question already has answers here:
android studio 3.0 Canary 1 : project refresh failed
(2 answers)
Closed 5 years ago.
I want to check my projects dependencies but having problem when running
./gradlew app:dependencies
Here is the result of terminal.
Thanks for helps.
I just needed to add new google repo to root gradle file.
buildscript {
repositories {
...
// You need to add the following repository to download the
// new plugin.
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha5'
}
This question already has answers here:
Why am I getting "(304) Not Modified" error on some links when using HttpWebRequest?
(5 answers)
Closed 5 years ago.
I am just installed Android Studio 2.3.
However, when I create any application, it always error.
For example, I just create new blank project.
It shows error: Error:Response 304: Not Modified has no content!
(see the screenshot)
I have already tried
Installing and reinstalling android studio, even delete the folder and not importing anything.
Invalidate cache and restart Android Studio
UPDATE:
I have already fixed this...
The problem is jcenter might now have the junit.jar or espresso.jar needed (or my internet connectin prevent me to fecth those). So, I change it to mavenCentral and it works
Before:
allprojects {
repositories {
jcenter()
}
}
After:
allprojects {
repositories {
mavenCentral()
}
}
I've been struggling with the same thing for many hours
https://services.gradle.org/distributions/gradle-3.3-all.zip download this link and extract it into C:\Program Files\Android\Android Studio\gradle\ now go to androidstudio -> setting -> build -> gradle edit gradle home as C:\Program Files\Android\Android Studio\gradle\gradle-3.3 disable offline work and save it
If it is not work diable testCompile 'junit:junit:4.12' in gradle and retry this process