rumax / react-native-PDFView

📚 PDF viewer for React Native
MIT License
301 stars 92 forks source link

Android - Could not find method compile() for arguments [project ':react-native-view-pdf'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. #240

Open MacDinhThanh opened 1 year ago

MacDinhThanh commented 1 year ago

add Could not find method compile() for arguments [project ':react-native-view-pdf'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. into dependencies of build.gradle when start ./gradlew clean error

jersrej commented 1 year ago

Im getting the same issue

rumax commented 1 year ago

react-native-view-pdf does not use compile but implementation, so you need to check your project if you still uses compile or implementation if you migrated to gradle7

jersrej commented 1 year ago

I actually used implementation instead of compile but still got an error

I tried this

implementation project(':react-native-view-pdf')

and this

implementation (':react-native-view-pdf')
rumax commented 1 year ago

@jersrej unfortunately cannot help with it without some reference project where it can be reproduced.

paulopgss commented 1 year ago

There is no need to add compile project(':react-native-view-pdf') or implementation (':react-native-view-pdf'), if you look in the demo folder it doesn't add it, I didn't and it worked

denialfarizi1 commented 1 year ago

I added this to my build.gradle, hope it helps

buildscript {
    ext {
        ...
        pdfViewerVersion = "3.2.0-beta.1"
        pdfViewerRepo = "com.github.mhiew"
    }
}
stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.