baronha / ting

🍞 Flexible and customizable React Native toast/alert notifications with support for positioning, custom rendering, click handlers, and duration control. Written in Swift and Kotlin
MIT License
313 stars 24 forks source link

Task :baronha_ting:compileDebugKotlin #14

Open tehmansardar opened 1 year ago

tehmansardar commented 1 year ago

e: D:\Tehman\dev\mernstack\rn\yarta-mobile\node_modules\@baronha\ting\android\src\main\java\com\ting\TingModule.kt: (44, 47): Unresolved reference: toast e: D:\Tehman\dev\mernstack\rn\yarta-mobile\node_modules\@baronha\ting\android\src\main\java\com\ting\TingModule.kt: (47, 29): Unresolved reference: ToastTopAnim e: D:\Tehman\dev\mernstack\rn\yarta-mobile\node_modules\@baronha\ting\android\src\main\java\com\ting\TingModule.kt: (50, 29): Unresolved reference: ToastBottomAnim e: D:\Tehman\dev\mernstack\rn\yarta-mobile\node_modules\@baronha\ting\android\src\main\java\com\ting\TingModule.kt: (68, 33): Unresolved reference: toast e: D:\Tehman\dev\mernstack\rn\yarta-mobile\node_modules\@baronha\ting\android\src\main\java\com\ting\TingModule.kt: (82, 47): Unresolved reference: alert e: D:\Tehman\dev\mernstack\rn\yarta-mobile\node_modules\@baronha\ting\android\src\main\java\com\ting\TingModule.kt: (98, 30): Unresolved reference: AlertAnim e: D:\Tehman\dev\mernstack\rn\yarta-mobile\node_modules\@baronha\ting\android\src\main\java\com\ting\TingModule.kt: (103, 33): Unresolved reference: alert ` Execution failed for task ':app:processDebugResources'.

A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction Android resource linking failed ERROR:D:\Tehman\dev\mernstack\rn\yarta-mobile\node_modules\@baronha\ting\android\build\intermediates\packaged_res\debug\drawable\done.xml:17: AAPT: error: resource color/done (aka com.yartaiaapp:color/done) not found.

 ERROR:D:\Tehman\dev\mernstack\rn\yarta-mobile\node_modules\@baronha\ting\android\build\intermediates\packaged_res\debug\drawable\error.xml:8: AAPT: error: resource color/error (aka com.yartaiaapp:color/error) not found.    

 ERROR:D:\Tehman\dev\mernstack\rn\yarta-mobile\node_modules\@baronha\ting\android\build\intermediates\packaged_res\debug\layout\spinner.xml:10: AAPT: error: resource color/black (aka com.yartaiaapp:color/black) not found.   

`

@baronha can you assist me?

commencementtech commented 12 months ago

Having the same issue @baronha

Please can you assist on it

baronha commented 12 months ago

Please try upgrade the Kotlin Version in build.gradle to see if it works!!

jordiepasman commented 6 months ago

Hi all,

I've also faced something like this issue, when I run my app in Release mode I faced the error below:

Execution failed for task ':baronha_ting:compileReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details
....node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt:83:15 'onScroll' overrides nothing

I am using the latest version of the package. However, when I revert back to version "v1.1.0", everything seems to be fine.

Versions:

RattyJhay commented 5 months ago

Hi all,

I've also faced something like this issue, when I run my app in Release mode I faced the error below:

Execution failed for task ':baronha_ting:compileReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details
....node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt:83:15 'onScroll' overrides nothing

I am using the latest version of the package. However, when I revert back to version "v1.1.0", everything seems to be fine.

Versions:

  • React Native: 0.73.6
  • @baronha/ting: 1.2.0
  • kotlinVersion: 1.8.0

@baronha I'm using "v1.1.0" but i'm still getting the still getting the same error: **Build failed with an exception.

Versions: react-native: 0.73.6 expo: ~50.0.17 @baronha/ting: ^1.1.0 kotlinVersion: 1.8.0

I got the same error using v1.2.0 and kotlin v1.6.10

KirillCustom commented 5 months ago

Hi all, I've also faced something like this issue, when I run my app in Release mode I faced the error below:

Execution failed for task ':baronha_ting:compileReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details
....node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt:83:15 'onScroll' overrides nothing

I am using the latest version of the package. However, when I revert back to version "v1.1.0", everything seems to be fine. Versions:

  • React Native: 0.73.6
  • @baronha/ting: 1.2.0
  • kotlinVersion: 1.8.0

@baronha I'm using "v1.1.0" but i'm still getting the still getting the same error: **Build failed with an exception.

  • What went wrong: Execution failed for task ':baronha_ting:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction**

Versions: react-native: 0.73.6 expo: ~50.0.17 @baronha/ting: ^1.1.0 kotlinVersion: 1.8.0

I got the same error using v1.2.0 and kotlin v1.6.10

I had the same problem on compileSdk 33. Added @Suppress("NOTHING_TO_OVERRIDE", "ACCIDENTAL_OVERRIDE") before onScroll.

diff --git a/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt b/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt
index 6b95315..144536b 100644
--- a/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt
+++ b/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt
@@ -80,6 +80,7 @@ class TingModule internal constructor(context: ReactApplicationContext) : TingSp
           // Add drag gesture recognizer
           contentView?.let { contentView ->
             val gestureDetector = GestureDetector(context, object : GestureDetector.SimpleOnGestureListener() {
+              @Suppress("NOTHING_TO_OVERRIDE", "ACCIDENTAL_OVERRIDE")
               override fun onScroll(e1: MotionEvent, e2: MotionEvent, distanceX: Float, distanceY: Float): Boolean {
                 // Check if the user scrolls vertically and dismiss the toast window if needed
                 if (abs(distanceY) > abs(distanceX)) {
RattyJhay commented 5 months ago

Hi all, I've also faced something like this issue, when I run my app in Release mode I faced the error below:

Execution failed for task ':baronha_ting:compileReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details
....node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt:83:15 'onScroll' overrides nothing

I am using the latest version of the package. However, when I revert back to version "v1.1.0", everything seems to be fine. Versions:

  • React Native: 0.73.6
  • @baronha/ting: 1.2.0
  • kotlinVersion: 1.8.0

@baronha I'm using "v1.1.0" but i'm still getting the still getting the same error: **Build failed with an exception.

  • What went wrong: Execution failed for task ':baronha_ting:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction** Versions: react-native: 0.73.6 expo: ~50.0.17 @baronha/ting: ^1.1.0 kotlinVersion: 1.8.0 I got the same error using v1.2.0 and kotlin v1.6.10

I had the same problem on compileSdk 33. Added @Suppress("NOTHING_TO_OVERRIDE", "ACCIDENTAL_OVERRIDE") before onScroll.

diff --git a/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt b/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt
index 6b95315..144536b 100644
--- a/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt
+++ b/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt
@@ -80,6 +80,7 @@ class TingModule internal constructor(context: ReactApplicationContext) : TingSp
           // Add drag gesture recognizer
           contentView?.let { contentView ->
             val gestureDetector = GestureDetector(context, object : GestureDetector.SimpleOnGestureListener() {
+              @Suppress("NOTHING_TO_OVERRIDE", "ACCIDENTAL_OVERRIDE")
               override fun onScroll(e1: MotionEvent, e2: MotionEvent, distanceX: Float, distanceY: Float): Boolean {
                 // Check if the user scrolls vertically and dismiss the toast window if needed
                 if (abs(distanceY) > abs(distanceX)) {

did it fix the problem when you added it?

KirillCustom commented 5 months ago

Hi all, I've also faced something like this issue, when I run my app in Release mode I faced the error below:

Execution failed for task ':baronha_ting:compileReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details
....node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt:83:15 'onScroll' overrides nothing

I am using the latest version of the package. However, when I revert back to version "v1.1.0", everything seems to be fine. Versions:

  • React Native: 0.73.6
  • @baronha/ting: 1.2.0
  • kotlinVersion: 1.8.0

@baronha I'm using "v1.1.0" but i'm still getting the still getting the same error: **Build failed with an exception.

  • What went wrong: Execution failed for task ':baronha_ting:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction** Versions: react-native: 0.73.6 expo: ~50.0.17 @baronha/ting: ^1.1.0 kotlinVersion: 1.8.0 I got the same error using v1.2.0 and kotlin v1.6.10

I had the same problem on compileSdk 33. Added @Suppress("NOTHING_TO_OVERRIDE", "ACCIDENTAL_OVERRIDE") before onScroll.

diff --git a/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt b/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt
index 6b95315..144536b 100644
--- a/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt
+++ b/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt
@@ -80,6 +80,7 @@ class TingModule internal constructor(context: ReactApplicationContext) : TingSp
           // Add drag gesture recognizer
           contentView?.let { contentView ->
             val gestureDetector = GestureDetector(context, object : GestureDetector.SimpleOnGestureListener() {
+              @Suppress("NOTHING_TO_OVERRIDE", "ACCIDENTAL_OVERRIDE")
               override fun onScroll(e1: MotionEvent, e2: MotionEvent, distanceX: Float, distanceY: Float): Boolean {
                 // Check if the user scrolls vertically and dismiss the toast window if needed
                 if (abs(distanceY) > abs(distanceX)) {

did it fix the problem when you added it?

Yes, adding this code fixed problem.

baronha commented 5 months ago

Hi all, I've also faced something like this issue, when I run my app in Release mode I faced the error below:

Execution failed for task ':baronha_ting:compileReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details
....node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt:83:15 'onScroll' overrides nothing

I am using the latest version of the package. However, when I revert back to version "v1.1.0", everything seems to be fine. Versions:

  • React Native: 0.73.6
  • @baronha/ting: 1.2.0
  • kotlinVersion: 1.8.0

@baronha I'm using "v1.1.0" but i'm still getting the still getting the same error: **Build failed with an exception.

  • What went wrong: Execution failed for task ':baronha_ting:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction** Versions: react-native: 0.73.6 expo: ~50.0.17 @baronha/ting: ^1.1.0 kotlinVersion: 1.8.0 I got the same error using v1.2.0 and kotlin v1.6.10

I had the same problem on compileSdk 33. Added @Suppress("NOTHING_TO_OVERRIDE", "ACCIDENTAL_OVERRIDE") before onScroll.

diff --git a/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt b/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt
index 6b95315..144536b 100644
--- a/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt
+++ b/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt
@@ -80,6 +80,7 @@ class TingModule internal constructor(context: ReactApplicationContext) : TingSp
           // Add drag gesture recognizer
           contentView?.let { contentView ->
             val gestureDetector = GestureDetector(context, object : GestureDetector.SimpleOnGestureListener() {
+              @Suppress("NOTHING_TO_OVERRIDE", "ACCIDENTAL_OVERRIDE")
               override fun onScroll(e1: MotionEvent, e2: MotionEvent, distanceX: Float, distanceY: Float): Boolean {
                 // Check if the user scrolls vertically and dismiss the toast window if needed
                 if (abs(distanceY) > abs(distanceX)) {

did it fix the problem when you added it?

Yes, adding this code fixed problem.

please create a pull request to solve this issue

RattyJhay commented 5 months ago

Hi all, I've also faced something like this issue, when I run my app in Release mode I faced the error below:

Execution failed for task ':baronha_ting:compileReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details
....node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt:83:15 'onScroll' overrides nothing

I am using the latest version of the package. However, when I revert back to version "v1.1.0", everything seems to be fine. Versions:

  • React Native: 0.73.6
  • @baronha/ting: 1.2.0
  • kotlinVersion: 1.8.0

@baronha I'm using "v1.1.0" but i'm still getting the still getting the same error: **Build failed with an exception.

  • What went wrong: Execution failed for task ':baronha_ting:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction** Versions: react-native: 0.73.6 expo: ~50.0.17 @baronha/ting: ^1.1.0 kotlinVersion: 1.8.0 I got the same error using v1.2.0 and kotlin v1.6.10

I had the same problem on compileSdk 33. Added @Suppress("NOTHING_TO_OVERRIDE", "ACCIDENTAL_OVERRIDE") before onScroll.

diff --git a/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt b/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt
index 6b95315..144536b 100644
--- a/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt
+++ b/node_modules/@baronha/ting/android/src/main/java/com/ting/TingModule.kt
@@ -80,6 +80,7 @@ class TingModule internal constructor(context: ReactApplicationContext) : TingSp
           // Add drag gesture recognizer
           contentView?.let { contentView ->
             val gestureDetector = GestureDetector(context, object : GestureDetector.SimpleOnGestureListener() {
+              @Suppress("NOTHING_TO_OVERRIDE", "ACCIDENTAL_OVERRIDE")
               override fun onScroll(e1: MotionEvent, e2: MotionEvent, distanceX: Float, distanceY: Float): Boolean {
                 // Check if the user scrolls vertically and dismiss the toast window if needed
                 if (abs(distanceY) > abs(distanceX)) {

did it fix the problem when you added it?

Yes, adding this code fixed problem.

I'm still getting the same error. I added it in the node modules but it didn't work. Can you be specific on how you did yours: this is mine

// Add drag gesture recognizer
          contentView?.let { contentView ->
            val gestureDetector = GestureDetector(context, object : GestureDetector.SimpleOnGestureListener() {
              @Suppress("NOTHING_TO_OVERRIDE", "ACCIDENTAL_OVERRIDE")
              override fun onScroll(e1: MotionEvent, e2: MotionEvent, distanceX: Float, distanceY: Float): Boolean {
                // Check if the user scrolls vertically and dismiss the toast window if needed
                if (abs(distanceY) > abs(distanceX)) {
                  if (position == Gravity.TOP && distanceY > dragThreshold) { // Dismiss upward if toast is at the top
                    toastWindow.cancel()
                    return true
                  } else if (position == Gravity.BOTTOM && distanceY < -dragThreshold) { // Dismiss downward if toast is at the bottom
                    toastWindow.cancel()
                    return true
                  }
                }

                return super.onScroll(e1, e2, distanceX, distanceY)
              }
            })