Failed to resolve: com.github.worker8:tourguide:1.0.17-SNAPSHOT - android

Whenever I'm trying to include worker8/TourGuide library in my gradle file it is throwing me this error:
"Failed to resolve: com.github.worker8:tourguide:1.0.17-SNAPSHOT"
I tried to clean the project and tried to rebuild as well but nothing worked for me. Please provide your help. Thanks in advance.
app gradle file
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.abdulrehman.myapplication"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
// compile ('com.github.worker8:tourguide:1.0.13-SNAPSHOT#aar'){
// transitive=true
// }
compile 'com.github.amlcurran.showcaseview:library:5.4.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
Project gradle file
buildscript {
repositories {
jcenter()
google()
mavenCentral()
maven(){
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

dont place third party url in buildscript. place in allprojects.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
google()
mavenCentral()
maven(){
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

Related

Could not resolve com.android.tools.build:gradle:3.2.1. error in gradle

i'm trying to compile my project but i get this error, i tried to resolve my problem with other answers but nothing helped:
Could not resolve com.android.tools.build:gradle:3.5.3.
Could not get resource 'https://maven.google.com/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'.
Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
**
my Gradle app looks like this:
apply plugin: 'com.android.application'
android {
buildToolsVersion "28.0.0"
// buildToolsVersion "29"
compileSdkVersion 28
defaultConfig {
applicationId "com.example.a1.makeitapp"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
allprojects {
repositories {
google()
maven { url "https://jitpack.io" }
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.android.gms:play-services-auth:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
testImplementation 'junit:junit:4.12'
// androidTestImplementation 'com.android.support.test:runner:1.0.2'
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.github.parse-community.Parse-SDK-Android:fcm:1.18.5'
// implementation 'com.android.support:design:REPLACE-WITH-APPCOMPAT-VERSION'
}
}
my Gradle :
buildscript {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://maven.google.com' }
}
dependencies {
//classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.android.tools.build:gradle:3.5.3'
//classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://maven.google.com' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
can someone help to solve the problem??
thanks!!

Could not find method maven()

I am getting the following error :
Could not find method maven() for arguments [build_3sdtqstdmsgdnexrxaaxgljji$_run_closure1$_closure4#325a800c] on root project 'Appointments' of type org.gradle.api.Project.
Here's my Project Level Gradle File:
buildscript {
repositories {
google()
jcenter()
maven { url "http://jcenter.bintray.com"}
maven { url "https://maven.fabric.io/public" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:4.0.0'
classpath 'io.fabric.tools:gradle:1.25.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
maven {
url 'https://maven.google.com/'
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And here's my app level Gradle File :
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.gtaandteam.android.wellcure"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
maven {
url "https://s3-ap-southeast-1.amazonaws.com/godel-release/godel/"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'ai.devsupport.instamojo:instamojolib:0.1.6'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-crash:11.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation "com.android.support:design:24.2.0"
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.3'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
I have tried all the techniques mentioned in other posts and solution website, but I dont find my same error listed in any of these websites. Hence I am creating this question here.
You're getting this error because your maven shouldn't be a direct child of "allprojects" but a direct child of "repositories".
allprojects {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
}
}
}

Android Studio: Error (2,0) Could not find method android() for arguments

Android Studio: Error (2,0) Could not find method android() for arguments [build_a4vgo3afez72iz8asoewhe39c$_run_closure1#7748caff] on root project '[ProjectName]' of type org.gradle.api.Project.
I am a new programmer just starting out, however I've had a problem with Android Studio in that my project will not successfully build. The response each build is the one stated above.
Anything you spot that can be the source of the problem? (Thanks in advance)
My Module app:
apply plugin: 'com.android.application'
apply plugin: 'java'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.rookr.scientificcalculator"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.12'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
My Top-end app:
android {
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
}
Remove android from top build
File should be start with buildscript
Remove android from the Top-level build.gradle.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

Unable to resolve dependency for ':app#release/compileClasspat': could not resolve com.nineoldandroidlibs:library:2.4.0

Unable to resolve dependency for ':app#release/compileClasspat': could not resolve com.nineoldandroidlibs:library:2.4.0 I am trying to import fancy button and pie chart libraries but i am getting the error mention above. I tried everything but nothing works. Following is my gradle file of project
buildscript {
repositories {
google()
// maven { url "https://maven.google.com"}
maven {
url 'https://maven.google.com'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {
url 'https://maven.google.com'
}
google()
// maven { url "https://maven.google.com"}
//maven { url "https://jitpack.io" }
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Following is my Gradle Project file
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.hamzanaeem.gasapplication"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.github.blackfizz:eazegraph:1.2.2#aar'
compile 'com.github.medyo:fancybuttons:1.8.4'
}
Please help I`ve already tried all of the solution from stackoverflow too.
Thanks

firebase jobdispatcher- I can't add dependency

I have problem w adding dependency for firebase jobdispatcher, I have tried back and forth with my gradle file, I have installed Google Play service in my android SDK and still I can't compile this depencency.
Here is my gradle file -app level
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.android.project"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding.enabled = true
}
repositories {
mavenCentral()
maven {url "https://clojars.org/repo/"}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:recyclerview-v7:26.0.1'
compile 'com.android.support:preference-v7:26.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
compile 'com.firebase:firebase-jobdispatcher:0.5.2'
}
and here project level
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
try this in project-level build.gradle

Categories

Resources