triniwiz / nativescript-plugins

Apache License 2.0
80 stars 50 forks source link

[Stripe] Android compile error #104

Closed Stanteq closed 2 years ago

Stanteq commented 2 years ago

Hi. Please help with the following error on Android. I tried some suggestions from stackoverflow by editing before-plugins.gradle but without any success, also I installed sdk build-tools versions accordingly:

android {
  project.ext {
    supportVersion = "29.+"
    androidXCore = "1.6.0"
    compileSdkVersion = 29
    targetSdkVersion = 29
    googlePlayServicesVersion = "16.+"
  }
}

Environment: ns: 8

"@nativescript/core": "~8.1.5", "@nativescript/android": "8.1.1",

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > 1 exception was raised by workers:
     com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
     /Users/x/.gradle/caches/transforms-2/files-2.1/bq191e62c435c2f5qd156e07a42ac8/core-1.7.0/res/values/values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.

* 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 5s
Failed to build plugin @triniwiz/nativescript-stripe :
Error: Command ./gradlew failed with exit code 1
triniwiz commented 2 years ago

I will add note but if you are not targeting API 31+ you should you v7 of the plugin

Stanteq commented 2 years ago

@triniwiz Thx for suggestion

Installed v.32 and I have same error. Specified targeting version also in app.gradle & before-plugins.gradle files (tried various combinations)

api 31 never worked for me: Installed Build Tools revision 31.0.0 is corrupted

triniwiz commented 2 years ago

You will need to use the alpha version of the runtime along with the next version of the cli

usmanumer009 commented 1 year ago

I am facing the same issue. @Stanteq please help. How can I solve this issue

triniwiz commented 1 year ago

@usmanumer009 you need to use the latest android runtime