Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set the value of read-only property 'force ' for DefaultExternalModuleDependency #54

Open
Kazi-Wahed opened this issue Jan 2, 2024 · 8 comments

Comments

@Kazi-Wahed
Copy link

Kazi-Wahed commented Jan 2, 2024

implementation('com.github.barteksc:android-pdf-viewer:3.0.0-beta.4') { force = true }

A problem occurred evaluating project ':pdf_viewer_plugin'.

Cannot set the value of read-only property 'force' for DefaultExternalModuleDependency{group='com.github.barteksc', name='android-pdf-viewer', version='3.0.0-beta.4', configuration='default'} of type org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency.

@gabrielaraujoz
Copy link

@lubritto hey there! Is there any chance we could solve this issue? If you're willing to merge the PR, I could make this update for you. Let me know <3

@johnyen220
Copy link

Does it solved ? And new version released? Thank a lot!

@Tolulope05
Copy link

No update on this? cc @johnyen220 @gabrielaraujoz @Kazi-Wahed @chrismills @lubritto

@Tolulope05
Copy link

Launching lib\main.dart on SM A205F in debug mode...

FAILURE: Build failed with an exception.

  • Where:
    Build file 'C:\Users\ogara\AppData\Local\Pub\Cache\hosted\pub.dev\pdf_viewer_plugin-2.0.1\android\build.gradle' line: 39

  • What went wrong:
    A problem occurred evaluating project ':pdf_viewer_plugin'.

Cannot set the value of read-only property 'force' for DefaultExternalModuleDependency{group='com.github.barteksc', name='android-pdf-viewer', version='3.0.0-beta.4', configuration='default'} of type org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

BUILD FAILED in 8s
Error: Gradle task assembleDebug failed with exit code 1

@Tolulope05
Copy link

Below is the build.gradle:

group 'dev.britto.pdf_viewer_plugin'
version '1.0'

buildscript {
repositories {
google()
jcenter()
}

dependencies {
    classpath 'com.android.tools.build:gradle:4.1.0'
}

}

rootProject.allprojects {
repositories {
google()
jcenter()
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion 30

defaultConfig {
    minSdkVersion 16
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
    disable 'InvalidPackage'
}

}

dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation('com.github.barteksc:android-pdf-viewer:3.0.0-beta.4') {
force = true
}
}

@pscire
Copy link

pscire commented Oct 31, 2024

Same problem here:

A problem occurred evaluating project ':pdf_viewer_plugin'.
> Cannot set the value of read-only property 'force' for DefaultExternalModuleDependency{group='com.github.barteksc', name='android-pdf-viewer', version='3.0.0-beta.4', configuration='default'} of type org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency.

by commenting the force = true
end up to:

Could not resolve com.github.barteksc:android-pdf-viewer:3.0.0-beta.4.
         > Could not get resource 'https://www.jitpack.io/com/github/barteksc/android-pdf-viewer/3.0.0-beta.4/android-pdf-viewer-3.0.0-beta.4.pom'.
            > Could not GET 'https://www.jitpack.io/com/github/barteksc/android-pdf-viewer/3.0.0-beta.4/android-pdf-viewer-3.0.0-beta.4.pom'. Received status code 401 from server: Unauthorized

@goat-solutions
Copy link

Same problem. No update on this? cc @johnyen220 @gabrielaraujoz @Kazi-Wahed @chrismills @lubritto

@gabrielaraujoz
Copy link

Not that I'm aware of, the solution was forking this library and updating it myself locally to make it work. I based my solution from this issue:

DImuthuUpe/AndroidPdfViewer#1201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants