klaviyo / klaviyo-android-sdk

SDK that allows users to incorporate Klaviyo's event and person tracking functionality within native Android applications. Written in Kotlin
https://klaviyo.github.io/klaviyo-android-sdk/
MIT License
7 stars 2 forks source link

I am getting error when i try integrate klaviyo sdk with android app #132

Closed rovedashcam closed 8 months ago

rovedashcam commented 8 months ago

Description

I am getting below error : 
> Task :app:processDebugResources FAILED

Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   > AAPT2 aapt2-7.0.3-7396180-osx Daemon #0: Unexpected error during link, attempting to stop daemon.
     This should not happen under normal circumstances, please file an issue if it does.

* 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.

here is build.gradle  app level gradle dependencies 

dependencies {

    implementation "com.github.klaviyo.klaviyo-android-sdk:analytics:2.0.0"
    implementation "com.github.klaviyo.klaviyo-android-sdk:push-fcm:2.0.0"
}

build.gradle project level 

 dependencies {
        classpath 'com.android.tools.build:gradle:7.0.3'
        classpath 'com.google.gms:google-services:4.3.10'
        // Add the Crashlytics Gradle plugin
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
        classpath 'com.vanniktech:gradle-maven-publish-plugin:0.15.1'

    }

please help me how to fix this issue .

Checklist

Expected behavior

Code should build successfully

Actual behavior

I am getting above error

Steps to reproduce

try to add gradle dependencies

The Klaviyo Android SDK version information

2.0.0

Device Information

compileSdkVersion 34 // Update to API level 34 ndkVersion '25.2.9519653' buildToolsVersion "34.0.0" // Update to the corresponding build tools version

defaultConfig {
    applicationId "com.test.android"
    minSdkVersion 23
    targetSdkVersion 34
    versionCode 69
    versionName "3.20"
    multiDexEnabled true

}

Android Studio Version

Android Studio Hedgehog | 2023.1.1 Patch 1 Build #AI-231.9392.1.2311.11255304, built on December 27, 2023 Runtime version: 17.0.7+0-17.0.7b1000.6-10550314 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 14.2.1 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 8 Metal Rendering is ON Registry: external.system.auto.import.disabled=true ide.text.editor.with.preview.show.floating.toolbar=false ide.instant.shutdown=false

Non-Bundled Plugins: Dart (231.9411) PythonCore (231.9225.4) io.flutter (77.1.2)

Android API Level

34

evan-masseau commented 8 months ago

I've seen gradle errors with this kind of output before in my time working on android projects (not just this SDK)

A failure occurred while executing [build step] This should not happen under normal circumstances, please file an issue if it does.

and it typically is due to some gradle configuration issue. I don't think this is something specific to our SDK. Here are a few suggestions

evan-masseau commented 8 months ago

Closing to consolidate with #133