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

android: compileDebugKotlin FAILED #45

Closed
Qdafengzi opened this issue May 27, 2024 · 0 comments
Closed

android: compileDebugKotlin FAILED #45

Qdafengzi opened this issue May 27, 2024 · 0 comments
Labels
P3 Small issue. Ready Ready for release.

Comments

@Qdafengzi
Copy link

agp = "8.4.1"
kotlin = "1.9.24"
"@dr.pogodin/react-native-fs": "2.25.0",

Hello Doctor, there is a compilation error. Please update the library at your earliest convenience.

e: ***/node_modules/@dr.pogodin/react-native-fs/android/src/main/java/com/drpogodin/reactnativefs/ReactNativeFsModule.kt:56:21 
Type mismatch: inferred type is Uri? but Uri was expected

need modify to

private fun getPickFileLauncher(): ActivityResultLauncher<Array<String>> {
        if (pickFileLauncher == null) {
            val registry = (currentActivity as ReactActivity).activityResultRegistry
            pickFileLauncher = registry.register<Array<String>, Uri?>(
                    "RNFS_pickFile",
                    OpenDocument()
            ) { uri ->
                val res = Arguments.createArray()
                if (uri != null) res.pushString(uri.toString())
                pendingPickFilePromises.pop().resolve(res)
            }
        }
        return pickFileLauncher!!
    }
@birdofpreyru birdofpreyru added P1 High priority issue. P3 Small issue. and removed P1 High priority issue. labels May 27, 2024
@birdofpreyru birdofpreyru added the Ready Ready for release. label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Small issue. Ready Ready for release.
Projects
None yet
Development

No branches or pull requests

2 participants