SenagasettiRamesh / cordova-plugin-sms-retriever-api

A cordova plugin that allows your app to read SMS by using Google's SMS Retriever API for Android devices.
1 stars 2 forks source link

app compilation failed #1

Open jyprksh001 opened 5 years ago

jyprksh001 commented 5 years ago

when I tried to run "ionic Cordova run android" command. i got following error in the console /home/anu/work/ionic/jobnew/platforms/android/src/com/cordova/plugin/android/smsretriever/smsretrieverapi.java:56: error: local variable callbackContext is accessed from within inner class; needs to be declared final if(callbackContext != null) {
^ /home/anu/work/ionic/jobnew/platforms/android/src/com/cordova/plugin/android/smsretriever/smsretrieverapi.java:57: error: local variable callbackContext is accessed from within inner class; needs to be declared final staticCallbackContext = callbackContext;
^ /home/anu/work/ionic/jobnew/platforms/android/src/com/cordova/plugin/android/smsretriever/smsretrieverapi.java:67: error: local variable callbackContext is accessed from within inner class; needs to be declared final callbackContext.error("Failed to start retriever");
^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 3 errors :compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

jyprksh001 commented 5 years ago

I fixed the bug by adding final keyword before the argument in the constructor and recompiled it. The app started crashing after installation.

SenagasettiRamesh commented 5 years ago

I fixed the bug by adding final keyword before the argument in the constructor and recompiled it. The app started crashing after installation.

Can you be able to debug and track the exception causing by your APK? Please share the device details along with the version of play services inside it.