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

A problem occurred configuring project ':amplitude_react-native'. #170

Closed
eldirb21 opened this issue Aug 28, 2023 · 2 comments
Closed

A problem occurred configuring project ':amplitude_react-native'. #170

eldirb21 opened this issue Aug 28, 2023 · 2 comments

Comments

@eldirb21
Copy link

eldirb21 commented Aug 28, 2023

1: Task failed with an exception.

  • Where:
    Build file '/Users/MYDevice/Desktop/ProjectApp/node_modules/@amplitude/react-native/android/build.gradle' line: 20

  • What went wrong:
    A problem occurred evaluating project ':amplitude_react-native'.

No signature of method: build_8qbq768y4gv7si69zdhx20v2b.android() is applicable for argument types: (build_8qbq768y4gv7si69zdhx20v2b$_run_closure1) values: [build_8qbq768y4gv7si69zdhx20v2b$_run_closure1@5d304b13]

  • 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.
    ==============================================================================

2: Task failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':amplitude_react-native'.

compileSdkVersion is not specified. Please add it to build.gradle

  • 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 4s

how can you solve this problem ?

my react native version :
"react": "17.0.1",
"react-native": "0.64.4",
"@amplitude/react-native": "^2.17.2",

MY SDK DETAILS PROJECT
ndkVersion '21.4.7075529' // comment this if error related to ndk when building locally
compileSdkVersion rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
flavorDimensions "default"
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 401
versionName "1.9.4"

AND SDK DETAILS AMPLITUDE LIBRARY
android {
namespace "com.amplitude.reactnative"
compileSdkVersion safeExtGet('compileSdkVersion', 29)
buildToolsVersion safeExtGet('buildToolsVersion', '29.0.2')
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 29)
versionCode 1
versionName "1.0"

    }

    buildTypes {
        release {
            minifyEnabled false
        }
    }
    lintOptions {
        disable 'GradleCompatible'
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

Note : in my Android studio, i have already all that SDK Tools versions

so, if someone can solve this problem. Please, share to me. thanks

@Mercy811
Copy link

Hi @eldirb21, it looks like you are having a problem to install Amplitude's React Native package in your project. Did you follow the installation here? Here is an example project and hope it helps.

@Mercy811
Copy link

Mercy811 commented Sep 5, 2023

Hi @eldirb21, we recommend to upgrade to the latest React Native SDK as we are putting this SDK to maintenance status.

@eldirb21 eldirb21 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2023
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

2 participants