react-native-PDFView icon indicating copy to clipboard operation
react-native-PDFView copied to clipboard

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.

Open MacDinhThanh opened this issue 3 years ago • 7 comments

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

MacDinhThanh avatar Nov 21 '22 08:11 MacDinhThanh

Im getting the same issue

jersrej avatar Nov 25 '22 05:11 jersrej

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

rumax avatar Nov 25 '22 07:11 rumax

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')

jersrej avatar Nov 25 '22 07:11 jersrej

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

rumax avatar Nov 30 '22 16:11 rumax

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

paulopgss avatar Feb 16 '23 02:02 paulopgss

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

buildscript {
    ext {
        ...
        pdfViewerVersion = "3.2.0-beta.1"
        pdfViewerRepo = "com.github.mhiew"
    }
}

denialfarizi1 avatar Mar 02 '23 14:03 denialfarizi1

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.

stale[bot] avatar May 15 '23 07:05 stale[bot]