Giter Site home page Giter Site logo

Comments (12)

mrcodecloud avatar mrcodecloud commented on September 24, 2024 1

Sure, Thanks for the effort.
I will try it now, and update you.

from groupdocs-viewer-cloud-java.

vladimir-litvinchik avatar vladimir-litvinchik commented on September 24, 2024 1

@RAZA-ABBBASI

Thank you for sharing the root cause of the issue!

from groupdocs-viewer-cloud-java.

mrcodecloud avatar mrcodecloud commented on September 24, 2024

I even try adding following dependency but still no luck

implementation 'com.groupdocs:groupdocs-viewer-cloud-android:21.8'

  • I did try adding repositories section to the app level gradle file

from groupdocs-viewer-cloud-java.

vladimir-litvinchik avatar vladimir-litvinchik commented on September 24, 2024

@RAZA-ABBBASI

Please make sure to declare the repositoy at allprojects.repositories section of the project level of build.gradle file e.g.

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.2.2"

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

allprojects {
    repositories {
        google()
        mavenCentral()
        jcenter() // Warning: this repository is going to shut down soon
        maven {
            url 'https://repository.groupdocs.cloud/repo'
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

And then referencing package at the dependencies section of the app level of build.gradle file e.g.

plugins {
    ...
}

android {
    ...
}

dependencies {
    ...
    implementation 'com.groupdocs:groupdocs-viewer-cloud:21.8'
}

from groupdocs-viewer-cloud-java.

mrcodecloud avatar mrcodecloud commented on September 24, 2024

I did try to do exactly as you mentioned above, but still no luck. I am posting my gradle files here now.

Project level gradle file

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:7.0.0-beta04"

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

allprojects {
    repositories {
        google()
        mavenCentral()
        maven {
            url 'https://repository.groupdocs.cloud/repo'
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

App level gradle file

plugins {
    id 'com.android.application'
}
android {
    compileSdk 30
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.it22.myapplication"
        minSdk 21
        targetSdk 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildFeatures {
        viewBinding true
    }
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
    implementation 'androidx.navigation:navigation-fragment:2.3.5'
    implementation 'androidx.navigation:navigation-ui:2.3.5'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

//    implementation 'com.groupdocs:groupdocs-viewer-cloud:21.8'
//    implementation 'com.groupdocs:groupdocs-viewer-cloud-android:21.8'
    implementation 'com.groupdocs:groupdocs-viewer-cloud:21.8'
}

I am using JDK 11, and gradle version 7.0.2 with gradle 7 plugin.

from groupdocs-viewer-cloud-java.

vladimir-litvinchik avatar vladimir-litvinchik commented on September 24, 2024

@RAZA-ABBBASI

Can you share the error message?

from groupdocs-viewer-cloud-java.

mrcodecloud avatar mrcodecloud commented on September 24, 2024

Could not find com.groupdocs:groupdocs-viewer-cloud:21.8.
Required by:
project :app
Search in build.gradle files

Uploading Screenshot at Aug 09 17-34-09.png…

from groupdocs-viewer-cloud-java.

mrcodecloud avatar mrcodecloud commented on September 24, 2024

This is the Error message, I am getting

Could not find com.groupdocs:groupdocs-viewer-cloud:21.8.
Required by:
project :app
Search in build.gradle files

from groupdocs-viewer-cloud-java.

mrcodecloud avatar mrcodecloud commented on September 24, 2024

Screenshot at Aug 09 17-34-09

from groupdocs-viewer-cloud-java.

vladimir-litvinchik avatar vladimir-litvinchik commented on September 24, 2024

@RAZA-ABBBASI

I've prepared a sample app that was created in Android Studio from templates and added a reference to the SDK. Can you try cloning and try building the following app https://github.com/vladimir-litvinchik/referencing-viewer-cloud-in-android-app and checking if the issue still persists?

from groupdocs-viewer-cloud-java.

mrcodecloud avatar mrcodecloud commented on September 24, 2024

@vladimir-litvinchik Thanks for the sample app, it's working fine.
Now I am trying to figure out the difference between your and mine and will report the reason here.

Thanks

from groupdocs-viewer-cloud-java.

mrcodecloud avatar mrcodecloud commented on September 24, 2024

The problem was following code in the project level settings.gradle file

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        jcenter() // Warning: this repository is going to shut down soon
    }
}

It was added by default on creating new app, After commenting this code I got my project build successfully.
Thanks @vladimir-litvinchik your sample helped me to find the cause of issue through difference check.

from groupdocs-viewer-cloud-java.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.