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

Does not work on android #2

Closed
dmy3k opened this issue Jul 27, 2016 · 11 comments
Closed

Does not work on android #2

dmy3k opened this issue Jul 27, 2016 · 11 comments
Labels

Comments

@dmy3k
Copy link

dmy3k commented Jul 27, 2016

NativeModules.RNSnackbar is undefined. Is android platform supported?

@cooperka
Copy link
Owner

cooperka commented Oct 20, 2016

Hi @Mitriy, this was a known problem that has been fixed. Please try again. I've published several fixes to npm (via my fork). Both android and iOS should be working now!

@joncursi
Copy link

joncursi commented Nov 1, 2016

I am running into the same issue when trying to build the app for Android:

/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:2 : Error retrieving parent for item: No resource found that matches the given name 'Animation.AppCompat.Dialog'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:2 : Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Display1'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:2 : Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:2 : Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:2 : Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:2 : Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:2 : Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Button'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:99:21-32 : No resource found that matches the given name: attr 'textAllCaps'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:2 : Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:2 : Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Dialog'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:2 : Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:2 : Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:118:21-36 : No resource found that matches the given name: attr 'windowActionBar'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:119:21-34 : No resource found that matches the given name: attr 'windowNoTitle'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:118:21-36 : No resource found that matches the given name: attr 'windowActionBar'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:119:21-34 : No resource found that matches the given name: attr 'windowNoTitle'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:13:56-65 : No resource found that matches the given name: attr 'elevation'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:21:64-78 : No resource found that matches the given name: attr 'backgroundTint'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:13:56-65 : No resource found that matches the given name: attr 'elevation'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:13:56-65 : No resource found that matches the given name: attr 'elevation'.
/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:13:56-65 : No resource found that matches the given name: attr 'elevation'.

:react-native-snackbar:processReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-snackbar:processReleaseResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/jcursi/Library/Android/sdk/build-tools/23.0.3/aapt'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

@cooperka
Copy link
Owner

cooperka commented Nov 1, 2016

Hi @joncursi, make sure you've successfully run npm install and react-native link react-native-snackbar before building.

@joncursi
Copy link

joncursi commented Nov 3, 2016

@cooperka I have done that:

$ react-native link react-native-snackbar
rnpm-install info Android module react-native-snackbar is already linked 
rnpm-install info iOS module react-native-snackbar is already linked 

But the build still fails with "No resource found" errors. I have tried linking via rnpm and via react native's own implementation, no luck.

Can we supplement the instructions on your fork with manual linking instructions? Something must not be connecting properly with RNPM that I need to tweak manually. I am on React Native 0.36.0

@joncursi
Copy link

joncursi commented Nov 3, 2016

Perhaps this isn't an issue at the package layer and it's a lower level issue at the Android SDK layer.

/Users/jcursi/Sites/joncursi/redbirdNative/node_modules/react-native-snackbar/android/build/intermediates/exploded-aar/com.android.support/design/23.3.0/res/values/values.xml:13:56-65 : No resource found that matches the given name: attr 'elevation'.

Any ideas on why these Android UI variable lookups are failing? Do I need to install something specific in the Android SDK Manager to get this to work properly?

@joncursi
Copy link

joncursi commented Nov 3, 2016

@cooperka I booted up Android Studio and it prompted me to update some SDK tools, as well as Gradle from 2.14.1 -> 2.2.2. After doing that, the project now compiles. I'm running into a few other issues, but they seem to be unrelated to this package, so I'm hoping that may have resolved it!

@cooperka
Copy link
Owner

cooperka commented Nov 3, 2016

Nice, I'm glad you got it working!

@lirbank
Copy link

lirbank commented Nov 13, 2016

I am having the exact same problem. I've upgraded Android Studio to no avail, @joncursi do you remember if there was anything else you did to get it to work?

@cooperka cooperka changed the title Does not work on android Build problems on Android Dec 10, 2016
@cooperka cooperka changed the title Build problems on Android Does not work on android Dec 10, 2016
@cooperka
Copy link
Owner

This issue was originally about a known problem that was resolved in v0.2.0. I'm going to close this since it's fixed, but @lirbank if you're still having trouble feel free to open a new issue!

@vicmpen
Copy link

vicmpen commented Dec 15, 2016

Hey everyone,

Came up with the same problem. Upgraded Gradle to 2.2.2 and SKD Tools to latest version and project compiled!

@lirbank
Copy link

lirbank commented Dec 18, 2016

Yes, just had a chance to look at this again, and upgrading Gradle solves it. Thanks for the help!

cooperka added a commit that referenced this issue Jan 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants