pusheco / pushe-android-studio-sample

This is a sample application powered by Pushe.co which is build with Android Studio.
http://pushe.co
Apache License 2.0
20 stars 6 forks source link

> Could not find com.huawei.hms:push:5.0.2.300. #54

Closed razaghimahdi closed 2 years ago

razaghimahdi commented 2 years ago

Why i get this??? whats the problem? how to solve that?

FAILURE: Build completed with 8 failures.

1: Task failed with an exception.

2: Task failed with an exception.

3: Task failed with an exception.

4: Task failed with an exception.

5: Task failed with an exception.

6: Task failed with an exception.

7: Task failed with an exception.

8: Task failed with an exception.

mahdi-malv commented 2 years ago

Hey

Have you added huawei's maven repos?

In code: https://github.com/pusheco/pushe-android-studio-sample/blob/fdcaf632574872087ed1a30fe311daaf062afe56/build.gradle#L28

razaghimahdi commented 2 years ago

yeah actually I did here is my code:

import dependencies.*

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" } 
         maven { url 'https://developer.huawei.com/repo/' }
        maven { url 'https://dl.bintray.com/tapsellorg/maven' }

    }
    dependencies {

        classpath Build.androidBuildTools
        classpath Build.kotlinGradlePlugin
        classpath Build.hiltAndroid
        classpath Build.navigationSafeArgsGradlePlugin

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
mahdi-malv commented 2 years ago

Well, that's not where they should be. These are for classpath plugins and not libraries.

If using latest ones the repositories -> allProjects is in settings.gradle file maybe. Wherever it is, it's not where you mentioned.

Please re-open the issue if the error wasn't resolved with the fix I suggested.

TIP: Also remove dl.bintray.com/*. Those servers are shutdown and not accessible. Libraries (such as Tapsell) are mostly moved to mavenCentral() which is added but default.

razaghimahdi commented 2 years ago

it worked tnx :)