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

Library has compilation issues with Android 13 #7545 #7558

Merged
merged 6 commits into from
Nov 7, 2022

Conversation

ankitsingh08
Copy link
Contributor

@ankitsingh08 ankitsingh08 commented Jul 11, 2022

Fix for compilation issues with the lib on Android 13 Issue #7545

@stale
Copy link

stale bot commented Sep 16, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the 🏚 stale label Sep 16, 2022
@svenlombaert
Copy link

What needs to happen to get this merged?

@stale stale bot removed the 🏚 stale label Sep 19, 2022
@julestruong
Copy link

I second @svenlombaert , why is this waiting ?

@mohamed2m2018
Copy link

I think this need to be merged

@ninjz
Copy link

ninjz commented Oct 5, 2022

I agree!

@julestruong
Copy link

For those who could not wait, i used a patch using https://www.npmjs.com/package/patch-package

diff --git a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt
index 78fb25d..7fd4637 100644
--- a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt
+++ b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt
@@ -74,7 +74,7 @@ open class ButtonPresenter(private val context: Context, private val button: But
     private fun applyAccessibilityLabel(menuItem: MenuItem) {
         if (button.accessibilityLabel.hasValue()) {
             if (button.component.hasValue()) {
-                menuItem.actionView.contentDescription = button.accessibilityLabel.get()
+                menuItem.actionView?.contentDescription = button.accessibilityLabel.get()
             } else {
                 MenuItemCompat.setContentDescription(menuItem, button.accessibilityLabel.get())
             }
diff --git a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/animations/BaseViewAnimator.kt b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/animations/BaseViewAnimator.kt
index 8d6c256..c30fcad 100644
--- a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/animations/BaseViewAnimator.kt
+++ b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/animations/BaseViewAnimator.kt
@@ -43,17 +43,17 @@ open class BaseViewAnimator<T : View>(
     private inner class AnimatorListener(private val startState: AnimationState, private val endVisibility: Int) : AnimatorListenerAdapter() {
         var isCancelled = false
 
-        override fun onAnimationStart(animation: Animator?) {
+        override fun onAnimationStart(animation: Animator) {
             view.resetViewProperties()
             view.visibility = View.VISIBLE
             animationState = startState
         }
 
-        override fun onAnimationCancel(animation: Animator?) {
+        override fun onAnimationCancel(animation: Animator) {
             isCancelled = true
         }
 
-        override fun onAnimationEnd(animation: Animator?) {
+        override fun onAnimationEnd(animation: Animator) {
             if (!isCancelled) {
                 animationState = AnimationState.Idle
                 view.visibility = endVisibility
diff --git a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/IconBackgroundDrawable.kt b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/IconBackgroundDrawable.kt
index a469d4c..e3f606a 100644
--- a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/IconBackgroundDrawable.kt
+++ b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/IconBackgroundDrawable.kt
@@ -68,7 +68,7 @@ class IconBackgroundDrawable(
         super.setBounds(r)
     }
 
-    override fun onBoundsChange(bounds: Rect?) {
+    override fun onBoundsChange(bounds: Rect) {
         if (bounds != null) {
             backgroundRect = Rect((bounds.width() - backgroundWidth) / 2,
                     (bounds.height() - backgroundHeight) / 2,

@sam-houle1
Copy link

Hi, is this PR ever going to be merged ?

@agestaun
Copy link

any update on this?

@gabpaet
Copy link

gabpaet commented Nov 3, 2022

Any update on this PR?

@manohar-octifi
Copy link

This issue still happening in 7.30.0 too, This PR needs to be merged

@mohamed2m2018
Copy link

Any updates on this?

@yogevbd
Copy link
Collaborator

yogevbd commented Nov 7, 2022

Releasing a fix with this PR today

@yogevbd yogevbd merged commit afbe27c into wix:master Nov 7, 2022
SudoPlz pushed a commit that referenced this pull request May 30, 2023
* Fix for compilation issues on Android 13

* exclude react-native from mavenCentral

* Lock react-native version

* Bump react-native to 0.69.7

Co-authored-by: Yogev Ben David <yogev132@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants