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

android build issue #50

Closed
aezzat3 opened this issue Oct 30, 2024 · 0 comments
Closed

android build issue #50

aezzat3 opened this issue Oct 30, 2024 · 0 comments

Comments

@aezzat3
Copy link

aezzat3 commented Oct 30, 2024

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @dongminyu/react-native-step-counter@0.2.5 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/@dongminyu/react-native-step-counter/android/build.gradle b/node_modules/@dongminyu/react-native-step-counter/android/build.gradle
index e4ee6d5..611d8d7 100644
--- a/node_modules/@dongminyu/react-native-step-counter/android/build.gradle
+++ b/node_modules/@dongminyu/react-native-step-counter/android/build.gradle
@@ -62,7 +62,7 @@ android {
   compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
 
   defaultConfig {
-    minSdkVersion getExtOrIntegerDefault("minSdkVersion")
+    minSdkVersion 24
     targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
     buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
   }
diff --git a/node_modules/@dongminyu/react-native-step-counter/android/gradle.properties b/node_modules/@dongminyu/react-native-step-counter/android/gradle.properties
index a805b86..1830a9a 100644
--- a/node_modules/@dongminyu/react-native-step-counter/android/gradle.properties
+++ b/node_modules/@dongminyu/react-native-step-counter/android/gradle.properties
@@ -1,5 +1,5 @@
-StepCounter_compileSdkVersion=31
-StepCounter_kotlinVersion=1.7.0
-StepCounter_targetSdkVersion=31
-StepCounter_minSdkVersion=21
-StepCounter_ndkversion=21.4.7075529
+StepCounter_compileSdkVersion=34
+StepCounter_kotlinVersion=1.9.23
+StepCounter_targetSdkVersion=34
+StepCounter_minSdkVersion=24
+StepCounter_ndkversion=26.1.10909125
\ No newline at end of file
diff --git a/node_modules/@dongminyu/react-native-step-counter/android/src/main/java/com/stepcounter/StepCounterModule.kt b/node_modules/@dongminyu/react-native-step-counter/android/src/main/java/com/stepcounter/StepCounterModule.kt
index 7e39a7b..d6ab0f8 100644
--- a/node_modules/@dongminyu/react-native-step-counter/android/src/main/java/com/stepcounter/StepCounterModule.kt
+++ b/node_modules/@dongminyu/react-native-step-counter/android/src/main/java/com/stepcounter/StepCounterModule.kt
@@ -35,7 +35,7 @@ class StepCounterModule internal constructor(context: ReactApplicationContext) :
     }
 
     private val appContext: ReactApplicationContext = context
-    private val lateinit sensorManager: SensorManager
+    private var sensorManager: SensorManager
     private val stepsOK: Boolean
         get() = checkSelfPermission(appContext, STEP_COUNTER) == PERMISSION_GRANTED
     private val accelOK: Boolean

This issue body was partially generated by patch-package.

@aezzat3 aezzat3 closed this as completed Oct 30, 2024
@aezzat3 aezzat3 changed the title Fix android build issue android build issue Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant