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.

aws-amplify-react-native:compileDebugJavaWithJavac FAILED: cannot find symbol `notification.setChannelId(channelId)`

See original GitHub issue

My dependencies in package.json:

"dependencies": {
		"aws-amplify": "^0.4.3",
		"aws-amplify-react-native": "^0.2.14",
		"aws-sdk": "^2.167.0",
		"lodash": "^4.17.4",
		"moment": "^2.22.1",
		"prop-types": "^15.6.1",
		"react": "^16.3.1",
		"react-dom": "^16.4.0",
		"react-native": "^0.55.4",
		"react-native-camera": "^1.1.4",
		"react-native-device-info": "^0.21.5",
		"react-native-elements": "^0.19.1",
		"react-native-fbsdk": "^0.7.0",
		"react-native-i18n": "^2.0.10",
		"react-native-image-picker": "^0.26.7",
		"react-native-permissions": "^1.0.6",
		"react-native-uuid": "^1.4.9",
		"react-native-vector-icons": "^4.6.0",
		"react-navigation": "^1.0.0-beta.21",
		"react-redux": "^5.0.7",
		"redux": "^4.0.0"
	},
	"devDependencies": {
		"babel-jest": "21.2.0",
		"babel-preset-react-native": "4.0.0",
		"eslint": "^4.13.1",
		"eslint-plugin-react": "^7.5.1",
		"jest": "21.2.1",
		"react-test-renderer": "^16.4.0",
		"redux-mock-store": "^1.5.1"
	},

On Android -> Gradle sync is ok but when I run react-native- run-android the build is failing for the following error:

> Task :aws-amplify-react-native:compileDebugJavaWithJavac FAILED
<...>/node_modules/aws-amplify-react-native/android/src/main/java/com/amazonaws/amplify/pushnotification/modules/RNPushNotificationHelper.java:295: error: cannot find symbol
                    notification.setChannelId(channelId);
                                ^
  symbol:   method setChannelId(String)
  location: variable notification of type Builder
Note: <...>/node_modules/aws-amplify-react-native/android/src/main/java/com/amazonaws/amplify/pushnotification/modules/RNPushNotificationHelper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
quantranlinh-agilityiocommented, Jun 4, 2018

I got the same issue. Any update?

0reactions
github-actions[bot]commented, Jun 13, 2021

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

not able to use setChannelId in android 5.0 and above
Try this one, worked fine for me. public void showNotification() { NotificationManager notificationManager = (NotificationManager) ...
Read more >
Create and Manage Notification Channels - Android Developers
On this page · Create a notification channel. Set the importance level · Read notification channel settings · Open the notification channel ...
Read more >
Part 3, Constructing Notifications | Channel Id - YouTube
In this video finally get down to the business of constructing a Notification. It is a pretty straight forward process.
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