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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporary Fixes #488

Open
imranemi143 opened this issue Mar 13, 2024 · 0 comments
Open

Temporary Fixes #488

imranemi143 opened this issue Mar 13, 2024 · 0 comments

Comments

@imranemi143
Copy link

Hi! 馃憢

Firstly, thanks for your work on this project! 馃檪

Today I used patch-package to patch react-native-voice@0.3.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-voice/android/build.gradle b/node_modules/react-native-voice/android/build.gradle
index c0484f8..d43b526 100644
--- a/node_modules/react-native-voice/android/build.gradle
+++ b/node_modules/react-native-voice/android/build.gradle
@@ -58,8 +58,9 @@ allprojects {
 def supportVersion = rootProject.hasProperty('supportLibVersion') ? rootProject.supportLibVersion : DEFAULT_SUPPORT_LIB_VERSION
 
 dependencies {
-    compile fileTree(dir: 'libs', include: ['*.jar'])
-    testCompile 'junit:junit:4.12'
-    compile 'com.android.support:appcompat-v7:${supportVersion}'
-    compile 'com.facebook.react:react-native:+'
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
+    testImplementation 'junit:junit:4.12'
+    implementation "com.android.support:appcompat-v7:${supportVersion}"
+    implementation 'com.facebook.react:react-native:+' // Use the latest version available
 }
+
diff --git a/node_modules/react-native-voice/android/src/main/java/com/wenkesj/voice/VoiceModule.java b/node_modules/react-native-voice/android/src/main/java/com/wenkesj/voice/VoiceModule.java
index 40b8927..d2d701d 100644
--- a/node_modules/react-native-voice/android/src/main/java/com/wenkesj/voice/VoiceModule.java
+++ b/node_modules/react-native-voice/android/src/main/java/com/wenkesj/voice/VoiceModule.java
@@ -11,7 +11,7 @@ import android.speech.RecognitionListener;
 import android.speech.RecognitionService;
 import android.speech.RecognizerIntent;
 import android.speech.SpeechRecognizer;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
 import android.util.Log;
 
 import com.facebook.react.bridge.Arguments;

This issue body was partially generated by patch-package.

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