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.

android build FAILURE:

See original GitHub issue

Before I have submitted the issue

[ ] I have read an installation guide
[ ] I know that for an iOS I need to install pods because I’ve read the installation guide
[ ] I have read a linking guide and checked that everything is OK like in manual linking guide
[ ] I know that before using tipsi-stripe I need to set options for my app as described in usage guide

The problem

Task :tipsi-stripe:compileDebugJavaWithJavac FAILED /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/RedirectUriReceiver.java:5: error: packa ge android.support.annotation does not exist import android.support.annotation.Nullable; ^ /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:3: error: package a ndroid.support.annotation does not exist import android.support.annotation.NonNull; ^ /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:4: error: package android.support.annotation does not exist import android.support.annotation.Nullable; ^ /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java:5: error: package android.support.annotation does not exist import android.support.annotation.NonNull; ^ /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/Errors.java:3: error: package android.support.annotation does not exist import android.support.annotation.NonNull; ^ /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/PayFlow.java:5: error: package android.support.annotation does not exist import android.support.annotation.NonNull; ^ /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/StripeModule.java:7: error: package android.support.annotation does not exist import android.support.annotation.NonNull; ^ /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/StripeModule.java:8: error: package android.support.annotation does not exist import android.support.annotation.Nullable; ^ /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/dialog/AddCardDialogFragment.java:8: error: package android.support.v4.content does not exist import android.support.v4.content.ContextCompat; ^ /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/OpenBrowserActivity.java:7: error: package android.support.annotation does not exist import android.support.annotation.Nullable; ^ /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/RedirectUriReceiver.java:14: error: cannot find symbol protected void onCreate(@Nullable Bundle savedInstanceState) { ^ symbol: class Nullable location: class RedirectUriReceiver /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:209: error: cannot find symbol public static WritableMap convertSourceToWritableMap(@Nullable Source source) { ^ symbol: class Nullable location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:208: error: cannot find symbol @NonNull ^ symbol: class NonNull location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:237: error: cannot find symbol public static WritableMap stringMapToWritableMap(@Nullable Map<String, String> map) { ^ symbol: class Nullable location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:236: error: cannot find symbol @NonNull ^ symbol: class NonNull location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:252: error: cannot find symbol public static WritableMap convertOwnerToWritableMap(@Nullable final SourceOwner owner) { ^ symbol: class Nullable location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:251: error: cannot find symbol @NonNull ^ symbol: class NonNull location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:272: error: cannot find symbol public static WritableMap convertAddressToWritableMap(@Nullable final Address address) { ^ symbol: class Nullable location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:271: error: cannot find symbol @NonNull ^ symbol: class NonNull location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:290: error: cannot find symbol public static WritableMap convertReceiverToWritableMap(@Nullable final SourceReceiver receiver) { ^ symbol: class Nullable location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:289: error: cannot find symbol @NonNull ^ symbol: class NonNull location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:306: error: cannot find symbol public static WritableMap convertRedirectToWritableMap(@Nullable SourceRedirect redirect) { ^ symbol: class Nullable location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:305: error: cannot find symbol @NonNull ^ symbol: class NonNull location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:321: error: cannot find symbol public static WritableMap convertCodeVerificationToWritableMap(@Nullable SourceCodeVerification codeVerification) { ^ symbol: class Nullable location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:320: error: cannot find symbol @NonNull ^ symbol: class NonNull location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:335: error: cannot find symbol public static WritableMap mapToWritableMap(@Nullable Map<String, Object> map){ ^ symbol: class Nullable location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:334: error: cannot find symbol @NonNull ^ symbol: class NonNull location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:349: error: cannot find symbol public static void pushRightTypeToMap(@NonNull WritableMap map, @NonNull String key, @NonNull Object object) { ^ symbol: class NonNull location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:349: error: cannot find symbol public static void pushRightTypeToMap(@NonNull WritableMap map, @NonNull String key, @NonNull Object object) { ^ symbol: class NonNull location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:349: error: cannot find symbol public static void pushRightTypeToMap(@NonNull WritableMap map, @NonNull String key, @NonNull Object object) { ^ symbol: class NonNull location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:406: error: cannot find symbol public static String getStringOrNull(@NonNull ReadableMap map, @NonNull String key) { ^ symbol: class NonNull location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/util/Converters.java:406: error: cannot find symbol public static String getStringOrNull(@NonNull ReadableMap map, @NonNull String key) { ^ symbol: class NonNull location: class Converters /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java:57: error: cannot find symbol public GoogleApiPayFlowImpl(@NonNull Fun0<Activity> activityProvider) { ^ symbol: class NonNull location: class GoogleApiPayFlowImpl /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java:61: error: cannot find symbol private PaymentsClient createPaymentsClient(@NonNull Activity activity) { ^ symbol: class NonNull location: class GoogleApiPayFlowImpl /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java:67: error: cannot find symbol private void isReadyToPay(@NonNull Activity activity, boolean isExistingPaymentMethodRequired, @NonNull final Promise promise) { ^ symbol: class NonNull location: class GoogleApiPayFlowImpl /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java:67: error: cannot find symbol private void isReadyToPay(@NonNull Activity activity, boolean isExistingPaymentMethodRequired, @NonNull final Promise promise) { ^ symbol: class NonNull location: class GoogleApiPayFlowImpl /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java:121: error: cannot find symbol private PaymentDataRequest createPaymentDataRequest(@NonNull final String totalPrice, ^ symbol: class NonNull location: class GoogleApiPayFlowImpl /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java:122: error: cannot find symbol @NonNull final String currencyCode, ^ symbol: class NonNull location: class GoogleApiPayFlowImpl /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java:127: error: cannot find symbol @NonNull final Collection<String> countryCodes ^ symbol: class NonNull location: class GoogleApiPayFlowImpl /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java:169: error: cannot find symbol private void startPaymentRequest(@NonNull Activity activity, @NonNull PaymentDataRequest request) { ^ symbol: class NonNull location: class GoogleApiPayFlowImpl /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java:169: error: cannot find symbol private void startPaymentRequest(@NonNull Activity activity, @NonNull PaymentDataRequest request) { ^ symbol: class NonNull location: class GoogleApiPayFlowImpl /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java:182: error: cannot find symbol public void paymentRequestWithAndroidPay(@NonNull ReadableMap payParams, @NonNull Promise promise) { ^ symbol: class NonNull location: class GoogleApiPayFlowImpl /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java:182: error: cannot find symbol public void paymentRequestWithAndroidPay(@NonNull ReadableMap payParams, @NonNull Promise promise) { ^ symbol: class NonNull location: class GoogleApiPayFlowImpl /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/GoogleApiPayFlowImpl.java:200: error: cannot find symbol public void deviceSupportsAndroidPay(boolean isExistingPaymentMethodRequired, @NonNull Promise promise) { ^ symbol: class NonNull location: class GoogleApiPayFlowImpl /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/Errors.java:30: error: cannot find symbol static String toErrorCode(@NonNull Exception exception) { ^ symbol: class NonNull location: class Errors /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/Errors.java:39: error: cannot find symbol static String getErrorCode(@NonNull ReadableMap errorCodes, @NonNull String errorKey) { ^ symbol: class NonNull location: class Errors /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/Errors.java:39: error: cannot find symbol static String getErrorCode(@NonNull ReadableMap errorCodes, @NonNull String errorKey) { ^ symbol: class NonNull location: class Errors /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/Errors.java:43: error: cannot find symbol static String getDescription(@NonNull ReadableMap errorCodes, @NonNull String errorKey) { ^ symbol: class NonNull location: class Errors /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/Errors.java:43: error: cannot find symbol static String getDescription(@NonNull ReadableMap errorCodes, @NonNull String errorKey) { ^ symbol: class NonNull location: class Errors /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/PayFlow.java:18: error: cannot find symbol protected final @NonNull Fun0<Activity> activityProvider; ^ symbol: class NonNull location: class PayFlow /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/PayFlow.java:23: error: cannot find symbol public PayFlow(@NonNull Fun0<Activity> activityProvider) { ^ symbol: class NonNull location: class PayFlow /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/PayFlow.java:59: error: cannot find symbol public void setPublishableKey(@NonNull String publishableKey) { ^ symbol: class NonNull location: class PayFlow /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/PayFlow.java:87: error: cannot find symbol public static boolean isPlayServicesAvailable(@NonNull Activity activity) { ^ symbol: class NonNull location: class PayFlow /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/StripeModule.java:55: error: cannot find symbol @Nullable ^ symbol: class Nullable location: class StripeModule /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/StripeModule.java:58: error: cannot find symbol @Nullable ^ symbol: class Nullable location: class StripeModule /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/StripeModule.java:93: error: cannot find symbol public void init(@NonNull ReadableMap options, @NonNull ReadableMap errorCodes) { ^ symbol: class NonNull location: class StripeModule /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/StripeModule.java:93: error: cannot find symbol public void init(@NonNull ReadableMap options, @NonNull ReadableMap errorCodes) { ^ symbol: class NonNull location: class StripeModule /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/StripeModule.java:131: error: cannot find symbol private static int androidPayModeToEnvironment(@NonNull String androidPayMode) { ^ symbol: class NonNull location: class StripeModule /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/StripeModule.java:315: error: cannot find symbol void processRedirect(@Nullable Uri redirectData) { ^ symbol: class Nullable location: class StripeModule /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/OpenBrowserActivity.java:19: error: cannot find symbol protected void onCreate(@Nullable Bundle savedInstanceState) { ^ symbol: class Nullable location: class OpenBrowserActivity /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/dialog/AddCardDialogFragment.java:123: error: cannot find symbol doneButton.setTextColor(ContextCompat.getColor(getActivity(), R.color.colorAccent)); ^ symbol: variable ContextCompat location: class AddCardDialogFragment /Users/user/Projekts/dryft/mobile/node_modules/tipsi-stripe/android/src/main/java/com/gettipsi/stripe/dialog/AddCardDialogFragment.java:124: error: cannot find symbol dialog.getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(ContextCompat.getColor(getActivity(), R.color.colorAccent)); ^ symbol: variable ContextCompat location: class AddCardDialogFragment Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 62 errors

Environment

  • tipsi-stripe version:
  • Last tipsi-stripe version where the issue was not reproduced (if applicable):
  • iOS or Android:
  • OS version:
  • React-Native version:
  • (Android only) com.google.firebase:firebase-core version:
  • (Android only) com.google.android.gms:play-services-base version:

Links to logs and sources

Create a GIST which is a paste of your full logs or sources, and link them here. If you are reporting a bug, always include build or error logs!

For Android, please provide the following sections from android/app/build.gradle:

  • android.compileSdkVersion
  • android.buildToolsVersion
  • android.defaultConfig.minSdkVersion
  • android.defaultConfig.targetSdkVersion
  • android.defaultConfig.multiDexEnabled (if exists)

Screenshots, GIFs (Must to have)

Just drag-and-drop them to this textarea

Code To Reproduce Issue (Good To Have)

Please remember that with sample code it’s easier to reproduce the bug and it’s much faster to fix it.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:25 (2 by maintainers)

github_iconTop GitHub Comments

41reactions
ElliDycommented, Mar 9, 2020

You can simply use npx jetify after npm install. It will replace all imports, which now use androidx.

8reactions
janoist1commented, Feb 21, 2020

I gave up, got rid of this unreliable library.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to build project with Android studio - Stack Overflow
File->Other Settings->Default Project Structure · Under Project Settings: Project, set Project SDK as Android SDK. · Click Edit button · For Android SDK,...
Read more >
Known issues with Android Studio and Android Gradle Plugin
Known issues with the Android Gradle Plugin · Not all dynamic-feature library dependencies are lint checked · Signing file named with carriage return...
Read more >
[FIXED] Android build failures `No matching variant of ... - GitHub
I'd like to share an update on a series of build failures React Native & Expo users have been experiencing when building Android...
Read more >
Why does a build fail in Android Studio even if I don't ... - Quora
There are several causes for gradle build fail in Android studio. Few reasons might be: * Dependencies added * Importing the project from...
Read more >
Different Ways to fix "Error running android: Gradle project ...
Different Ways to fix “Error running android: Gradle project sync failed” in Android Studio ; Method 1: Restarting your project using Invalidate ......
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