question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compile error on Android

See original GitHub issue

Please use Discussion board if you want get some help out of it. Please report issue if there is a bug.

Version of react-native-iap

8.0.5

Version of react-native

0.63.4

Platforms you faced the error (IOS or Android or both?)

Android

My setup

buildscript {
    ext {
        kotlinVersion = '1.5.20'
        buildToolsVersion = "29.0.2"
        minSdkVersion = 21
        compileSdkVersion = 29
        targetSdkVersion = 30
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:3.5.3")
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

Getting this compile error:

react-native-iap/android/src/play/java/com/dooboolab/RNIap/RNIapModule.kt: (215, 37): Type mismatch: inferred type is String? but String was expected

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-iap:compilePlayDebugKotlin'.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
andresesfmcommented, Mar 18, 2022

@heks Have you tried it with a more recent version of rn? I think the minimum rn version as of rn-iap 8.0.0 is 0.65.1

1reaction
Akashdeep312commented, Mar 18, 2022

hi @heks @aubert-creation please try to downgrade to “react-native-iap”: “^7.5.6”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Studio: Where is the Compiler Error Output Window?
For Android Studio v4.0 · Go to File · Then click on Settings · Then under "Build, Execution, Deployment" go to Compiler ·...
Read more >
Known issues with Android Studio and Android Gradle Plugin
Compilation errors may arise in Kotlin MPP code due to missing symbols. Upgrading your Kotlin plugin to version 1.4 should resolve this issue....
Read more >
How to resolve compile error: “Apps targeting Android 12 and ...
So I explicitly declared android:exported attribute for all components which use intent filters in AndroidManifest.xml, but still failed ...
Read more >
Android Studio Where is the Compiler Error Output Window
When I 'Run' my project in Android Studio, in the 'Messages' window, I receive the line: Gradle: FAILURE: Build failed with an exception....
Read more >
Android Studio: How to display compiler error output
You can display error output by click on Toggle view icon on left side of Build panel. Then you can walk through build...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found