ionic 4 android, android error: cannot find symbol - android

so this was building with no problem and then I was having problems with building ios so I removed the android platform and added it again. All the plugins and adding of the platform are being added correctly but when running the command $ ionic cordova build android I get a LOT of errors about not being able to find the symbol.
> Task :app:compileDebugJavaWithJavac FAILED
24 actionable tasks: 5 executed, 19 up-to-date
/Users/c.francia/Desktop/application/app/platforms/android/app/src/main/java/cordova/plugins/Diagnostic_Notifications.java:35: error: cannot find symbol
import android.support.v4.app.NotificationManagerCompat;
^
symbol: class NotificationManagerCompat
location: package android.support.v4.app
/Users/c.francia/Desktop/application/app/platforms/android/app/src/main/java/cordova/plugins/Diagnostic.java:57: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
^
symbol: class ActivityCompat
location: package android.support.v4.app
/Users/c.francia/Desktop/application/app/platforms/android/app/src/main/java/cordova/plugins/Diagnostic_External_Storage.java:28: error: cannot find symbol
import android.support.v4.os.EnvironmentCompat;
^
symbol: class EnvironmentCompat
location: package android.support.v4.os
/Users/c.francia/Desktop/application/app/platforms/android/app/src/main/java/nl/xservices/plugins/FileProvider.java:4: error: package android.support.v4.content does not exist
public class FileProvider extends android.support.v4.content.FileProvider {
^
/Users/c.francia/Desktop/application/app/platforms/android/app/src/main/java/com/ionicframework/cordova/webview/IonicWebViewEngine.java:11: error: package android.support.annotation does not exist
import android.support.annotation.RequiresApi;
^
/Users/c.francia/Desktop/application/app/platforms/android/app/src/main/java/com/ionicframework/cordova/webview/IonicWebViewEngine.java:121: error: cannot find symbol
#RequiresApi(Build.VERSION_CODES.LOLLIPOP)
^
symbol: class RequiresApi
location: class IonicWebViewEngine.ServerClient
/Users/c.francia/Desktop/application/app/platforms/android/app/src/main/java/cordova/plugins/Diagnostic_Notifications.java:123: error: cannot find symbol
NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(this.cordova.getActivity().getApplicationContext());
^
symbol: class NotificationManagerCompat
location: class Diagnostic_Notifications
/Users/c.francia/Desktop/application/app/platforms/android/app/src/main/java/cordova/plugins/Diagnostic_Notifications.java:123: error: cannot find symbol
NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(this.cordova.getActivity().getApplicationContext());
^
symbol: variable NotificationManagerCompat
location: class Diagnostic_Notifications
/Users/c.francia/Desktop/application/app/platforms/android/app/src/main/java/cordova/plugins/Diagnostic.java:639: error: cannot find symbol
java.lang.reflect.Method method = ActivityCompat.class.getMethod("shouldShowRequestPermissionRationale", Activity.class, java.lang.String.class);
^
symbol: class ActivityCompat
location: class Diagnostic
/Users/c.francia/Desktop/application/app/platforms/android/app/src/main/java/cordova/plugins/Diagnostic_External_Storage.java:216: error: cannot find symbol
addPath = Environment.MEDIA_MOUNTED.equals(EnvironmentCompat.getStorageState(file));
^
symbol: variable EnvironmentCompat
location: class Diagnostic_External_Storage
/Users/c.francia/Desktop/application/app/platforms/android/app/src/main/java/nl/xservices/plugins/SocialSharing.java:169: error: cannot find symbol
fileUri = FileProvider.getUriForFile(webView.getContext(), cordova.getActivity().getPackageName()+".sharing.provider", new File(fileUri.getPath()));
^
symbol: method getUriForFile(Context,String,File)
location: class FileProvider
/Users/c.francia/Desktop/application/app/platforms/android/app/src/main/java/nl/xservices/plugins/SocialSharing.java:285: error: cannot find symbol
fileUri = FileProvider.getUriForFile(webView.getContext(), cordova.getActivity().getPackageName()+".sharing.provider", new File(fileUri.getPath()));
^
symbol: method getUriForFile(Context,String,File)
location: class FileProvider
I have about 25 of those class errors. Never seen this error before and not a java programmer/used the android studio much.
I have found this SO post that looks like it might help? I just don't know how I go about updating the compiler tools through ionic or through the android studio?
I have also updated my SDK tools
Current version: Android Studio 3.5
Build number: AI-191.8026.42.35.5791312
Android SKD Tools: 26.1.1
Android Platform Version: API 29: Android 10.0 (Q) revision 3
$ java --version
$ java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

Try adding the following code in config.xml under android platform
<preference name="ANDROID_SUPPORT_V4_VERSION" default="27.+"/>
<framework src="com.android.support:supportv4:$ANDROID_SUPPORT_V4_VERSION"/>

Related

package expo.modules does not exist

I have created my react native project using npx react-native init project_name
Then I have build the project and it was building successfully.
Next thing I wanted to add expo-local-authentication package to my project, so I have followed the instrunction given by the official documentation i.e, https://github.com/expo/expo/tree/main/packages/expo-local-authentication
For bare React Native projects, you must ensure that you have installed and configured the expo package before continuing.
So I have installed the expo module in my react native project using the automation installation i.e, npx install-expo-modules#latest
But after installing it is giving the below error.
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
/Users/bhaveshkumar/Documents/AwesomeProject/android/app/src/main/java/com/awesomeproject/MainApplication.java:3: error: package expo.modules does not exist
import expo.modules.ApplicationLifecycleDispatcher;
^
/Users/bhaveshkumar/Documents/AwesomeProject/android/app/src/main/java/com/awesomeproject/MainApplication.java:4: error: package expo.modules does not exist
import expo.modules.ReactNativeHostWrapper;
^
/Users/bhaveshkumar/Documents/AwesomeProject/android/app/src/main/java/com/awesomeproject/MainActivity.java:2: error: package expo.modules does not exist
import expo.modules.ReactActivityDelegateWrapper;
^
/Users/bhaveshkumar/Documents/AwesomeProject/android/app/src/main/java/com/awesomeproject/MainApplication.java:22: error: cannot find symbol
new ReactNativeHostWrapper(this, new ReactNativeHost(this) {
^
symbol: class ReactNativeHostWrapper
location: class MainApplication
/Users/bhaveshkumar/Documents/AwesomeProject/android/app/src/main/java/com/awesomeproject/MainApplication.java:44: error: cannot find symbol
new ReactNativeHostWrapper(this, new MainApplicationReactNativeHost(this));
^
symbol: class ReactNativeHostWrapper
location: class MainApplication
/Users/bhaveshkumar/Documents/AwesomeProject/android/app/src/main/java/com/awesomeproject/MainApplication.java:62: error: cannot find symbol
ApplicationLifecycleDispatcher.onApplicationCreate(this);
^
symbol: variable ApplicationLifecycleDispatcher
location: class MainApplication
/Users/bhaveshkumar/Documents/AwesomeProject/android/app/src/main/java/com/awesomeproject/MainApplication.java:99: error: cannot find symbol
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig);
^
symbol: variable ApplicationLifecycleDispatcher
location: class MainApplication
/Users/bhaveshkumar/Documents/AwesomeProject/android/app/src/main/java/com/awesomeproject/MainActivity.java:26: error: cannot find symbol
return new ReactActivityDelegateWrapper(this, new MainActivityDelegate(this, getMainComponentName()));

ionic cordova build android failure after updating firebasex plugin

I need to update cordova-plugin-firebasex to the latest release, I have gone through the plugin installation and configuration steps here https://github.com/dpa99c/cordova-plugin-firebasex#firebase-config-setup.
As of right now i have iOS building correctly and sending analytic data to the firebase console. however android is currently failing when i attempt to build and i am at a loss of what i am missing.
the build errors i am getting are the following:
+-----------------------------------------------------------------
| cordova-android-support-gradle-release: 27.+
+-----------------------------------------------------------------
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed in version 5.0 of the Android Gradle plugin.
For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.
> Task :app:compileDebugJavaWithJavac FAILED
/Users/username/src/mobile-ui/platforms/android/app/src/main/java/org/apache/cordova/firebase/FirebasePlugin.java:860: error: cannot find symbol
handleBooleanTaskOutcome(FirebaseRemoteConfig.getInstance().activate(), callbackContext);
^
symbol: method activate()
location: class FirebaseRemoteConfig
/Users/username/src/mobile-ui/platforms/android/app/src/main/java/org/apache/cordova/firebase/FirebasePlugin.java:872: error: cannot find symbol
handleBooleanTaskOutcome(FirebaseRemoteConfig.getInstance().fetchAndActivate(), callbackContext);
^
symbol: method fetchAndActivate()
location: class FirebaseRemoteConfig
/Users/username/src/mobile-ui/platforms/android/app/src/main/java/org/apache/cordova/firebase/FirebasePlugin.java:884: error: cannot find symbol
handleTaskOutcome(FirebaseRemoteConfig.getInstance().reset(), callbackContext);
^
symbol: method reset()
location: class FirebaseRemoteConfig
/Users/username/src/mobile-ui/platforms/android/app/src/main/java/org/apache/cordova/firebase/FirebasePlugin.java:931: error: cannot find symbol
Map<String, FirebaseRemoteConfigValue> nativeValues = FirebaseRemoteConfig.getInstance().getAll();
^
symbol: method getAll()
location: class FirebaseRemoteConfig
/Users/username/src/mobile-ui/platforms/android/app/src/main/java/org/apache/cordova/firebase/FirebasePlugin.java:954: error: cannot find symbol
settings.setFetchTimeoutInSeconds(args.getLong(0));
^
symbol: method setFetchTimeoutInSeconds(long)
location: variable settings of type Builder
/Users/username/src/mobile-ui/platforms/android/app/src/main/java/org/apache/cordova/firebase/FirebasePlugin.java:958: error: cannot find symbol
settings.setMinimumFetchIntervalInSeconds(args.getLong(1));
^
symbol: method setMinimumFetchIntervalInSeconds(long)
location: variable settings of type Builder
/Users/username/src/mobile-ui/platforms/android/app/src/main/java/org/apache/cordova/firebase/FirebasePlugin.java:961: error: cannot find symbol
handleTaskOutcome(FirebaseRemoteConfig.getInstance().setConfigSettingsAsync(settings.build()), callbackContext);
^
symbol: method setConfigSettingsAsync(FirebaseRemoteConfigSettings)
location: class FirebaseRemoteConfig
/Users/username/src/mobile-ui/platforms/android/app/src/main/java/org/apache/cordova/firebase/FirebasePlugin.java:973: error: cannot find symbol
handleTaskOutcome(FirebaseRemoteConfig.getInstance().setDefaultsAsync(defaultsToMap(defaults)), callbackContext);
^
symbol: method setDefaultsAsync(Map<String,Object>)
location: class FirebaseRemoteConfig
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.
8 errors```

Image picker error in react native for android

I have had a promblem.
since I had installed 'react-native-image-picker', App does not executes.
For solving this problem, I had to add to AndroidManifest.xml to permission code.
and npm install jetifier. but everything does not solve this.
OS : windows 10
IDE : webstorm 2020.02
android studio: latest version
Below the code, I have faced error message.
C:\Users\ client>npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1236 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...
> Task :react-native-image-picker:compileDebugJavaWithJavac FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
62 actionable tasks: 2 executed, 60 up-to-date
C:\Users\ \node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:34: error: package com.imagepicker.media does not e
xist
import com.imagepicker.media.ImageConfig;
^
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:35: error: package com.imagepicker.permissions does
not exist
import com.imagepicker.permissions.PermissionUtils;
^
C:\Users\client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:36: error: package com.imagepicker.permissions does
not exist
import com.imagepicker.permissions.OnImagePickerPermissionsCallback;
^
C:\Users\client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:37: error: package com.imagepicker.utils.MediaUtils
does not exist
import com.imagepicker.utils.MediaUtils.ReadExifResult;
^
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:38: error: package com.imagepicker.utils does not e
xist
import com.imagepicker.utils.ReadableMapUtils;
^
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:39: error: package com.imagepicker.utils does not e
xist
import com.imagepicker.utils.RealPathUtil;
^
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:40: error: package com.imagepicker.utils does not e
xist
import com.imagepicker.utils.UI;
^
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:56: error: package com.imagepicker.utils does not e
xist
import static com.imagepicker.utils.MediaUtils.*;
^
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:57: error: package com.imagepicker.utils does not e
xist
import static com.imagepicker.utils.MediaUtils.createNewFile;
^
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:57: error: static import only from classes and inte
rfaces
import static com.imagepicker.utils.MediaUtils.createNewFile;
^
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:58: error: package com.imagepicker.utils does not e
xist
import static com.imagepicker.utils.MediaUtils.getResizedImage;
^
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:58: error: static import only from classes and inte
rfaces
import static com.imagepicker.utils.MediaUtils.getResizedImage;
^
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:86: error: cannot find symbol
private ImageConfig imageConfig = new ImageConfig(null, null, 0, 0, 100, 0, false);
^
symbol: class ImageConfig
location: class ImagePickerModule
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:66: error: cannot find symbol
public static final int DEFAULT_EXPLAINING_PERMISSION_DIALIOG_THEME = R.style.DefaultExplainingPermissionsTheme;
^
symbol: variable DefaultExplainingPermissionsTheme
location: class style
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:86: error: cannot find symbol
private ImageConfig imageConfig = new ImageConfig(null, null, 0, 0, 100, 0, false);
^
symbol: class ImageConfig
location: class ImagePickerModule
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:166: error: cannot find symbol
imageConfig = new ImageConfig(null, null, 0, 0, 100, 0, false);
^
symbol: class ImageConfig
location: class ImagePickerModule
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:168: error: package UI does not exist
final AlertDialog dialog = UI.chooseDialog(this, options, new UI.OnAction()
^
C:\Users\client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:168: error: cannot find symbol
final AlertDialog dialog = UI.chooseDialog(this, options, new UI.OnAction()
^
symbol: variable UI
location: class ImagePickerModule
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:274: error: cannot find symbol
final File original = createNewFile(reactContext, this.options, false);
^
symbol: method createNewFile(ReactApplicationContext,ReadableMap,boolean)
location: class ImagePickerModule
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:278: error: cannot find symbol
cameraCaptureURI = RealPathUtil.compatUriFromFile(reactContext, imageConfig.original);
^
symbol: variable RealPathUtil
location: class ImagePickerModule
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:374: error: cannot find symbol
if (ReadableMapUtils.hasAndNotEmptyString(options, "chooseWhichLibraryTitle"))
^
symbol: variable ReadableMapUtils
location: class ImagePickerModule
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:451: error: cannot find symbol
fileScan(reactContext, path);
^
symbol: method fileScan(ReactApplicationContext,String)
location: class ImagePickerModule
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:457: error: cannot find symbol
final ReadExifResult result = readExifInterface(responseHelper, imageConfig);
^
symbol: class ReadExifResult
location: class ImagePickerModule
C:\Users\client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:503: error: cannot find symbol
final RolloutPhotoResult rolloutResult = rolloutPhotoFromCamera(imageConfig);
^
symbol: class RolloutPhotoResult
location: class ImagePickerModule
C:\Users\client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:597: error: package PermissionUtils does not exist
.explainingDialog(this, options, new PermissionUtils.OnExplainingPermissionCallback()
^
C:\Users\client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:596: error: cannot find symbol
final AlertDialog dialog = PermissionUtils
^
symbol: variable PermissionUtils
location: class ImagePickerModule
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:658: error: cannot find symbol
else if (activity instanceof OnImagePickerPermissionsCallback)
^
symbol: class OnImagePickerPermissionsCallback
location: class ImagePickerModule
C:\Users\client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:660: error: cannot find symbol
((OnImagePickerPermissionsCallback) activity).setPermissionListener(listener);
^
symbol: class OnImagePickerPermissionsCallback
location: class ImagePickerModule
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:667: error: cannot find symbol
.append(OnImagePickerPermissionsCallback.class.getSimpleName())
^
symbol: class OnImagePickerPermissionsCallback
location: class ImagePickerModule
C:\Users\client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:685: error: cannot find symbol
return RealPathUtil.getRealPathFromURI(reactContext, uri);
^
symbol: variable RealPathUtil
location: class ImagePickerModule
30 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-image-picker:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 25s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
C:\Users\ client\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:34: error: package com.imagepicker.media does not exist

Android Project Compile Issues - From Eclipse to Android Studio

I am attempting to learn special functions of Android and have attempted to compile the app project listed below, but unfortunately it does not appear to compile on Android Studio.
Is anyone able to help on this issue?
It will be very beneficial for the wider community, as it teaches the workings of the various sensors such as speech etc. I am trying to follow the following book, but the author appears to have abandoned new updates:
http://www.amazon.co.uk/Professional-Android-Sensor-Programming-Programmer/dp/1118183487/ref=sr_1_1?s=books&ie=UTF8&qid=1448814695&sr=1-1&keywords=android+sensor
The link to the app project is as follows:
https://github.com/gast-lib/gast-lib
Thank you
Information:Using javac 1.7.0_51 to compile java sources
Information:java: Errors occurred while compiling module 'libraryLuceneExt'
Information:29/11/2015 18:31 - Compilation completed with 19 errors and 0 warnings in 8s 395ms
C:\Users*****\Desktop\gast-lib-master\gast-lib-master\libraryLuceneExt\src\root\gast\speech\lucene\LuceneIndexBuilder.java
Error:(18, 20) java: package android.util does not exist
Error:(58, 17) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.LuceneIndexBuilder
Error:(68, 17) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.LuceneIndexBuilder
Error:(88, 13) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.LuceneIndexBuilder
Error:(92, 13) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.LuceneIndexBuilder
Error:(96, 13) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.LuceneIndexBuilder
Error:(110, 13) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.LuceneIndexBuilder
Error:(126, 13) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.LuceneIndexBuilder
Error:(138, 13) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.LuceneIndexBuilder
Error:(143, 13) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.LuceneIndexBuilder
Error:(153, 17) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.LuceneIndexBuilder
Error:(157, 17) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.LuceneIndexBuilder
C:\Users*****\Desktop\gast-lib-master\gast-lib-master\libraryLuceneExt\src\root\gast\speech\lucene\LuceneIndexSearcher.java
Error:(16, 20) java: package android.util does not exist
Error:(62, 9) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.LuceneIndexSearcher
Error:(72, 17) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.LuceneIndexSearcher
Error:(80, 17) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.LuceneIndexSearcher
C:\Users*****\Desktop\gast-lib-master\gast-lib-master\libraryLuceneExt\src\root\gast\speech\lucene\RecognitionIndexer.java
Error:(12, 20) java: package android.util does not exist
Error:(59, 17) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.RecognitionIndexer
Error:(67, 17) java: cannot find symbol
symbol: variable Log
location: class root.gast.speech.lucene.RecognitionIndexer

Phonegap Android with PushPlugin compilation failure

I'm trying to run a phonegap application with the PushPlugin installed.
I adde the plugin with this command:
$ phonegap local plugin add https://github.com/phonegap-build/PushPlugin
and it went through ok.
I added the PushNotification.js file to my "www" folder and referenced it in index.html.
Then I added some code to handle notifications in my index.js file.
I tried to run the application:
$ phonegap local run android
and got this:
-compile:
[javac] Compiling 8 source files to /Users/nadavelyashiv/Code/PushNotificationSample/platforms/android/bin/classes
[javac] /Users/nadavelyashiv/Code/PushNotificationSample/platforms/android/src/com/plugin/gcm/GCMIntentService.java:96: cannot find symbol
[javac] symbol : method getString(java.lang.String)
[javac] location: class com.plugin.gcm.GCMIntentService
[javac] .setTicker(getString("title"))
[javac] ^
[javac] /Users/nadavelyashiv/Code/PushNotificationSample/platforms/android/src/com/plugin/gcm/GCMIntentService.java:95: cannot find symbol
[javac] symbol : method getString(java.lang.String)
[javac] location: class com.plugin.gcm.GCMIntentService
[javac] .setContentTitle(getString("title"))
[javac] ^
[javac] 2 errors
BUILD FAILED
/usr/local/Cellar/android-sdk/r22.0.4/tools/ant/build.xml:720: The following error occurred while executing this line:
/usr/local/Cellar/android-sdk/r22.0.4/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
What seems to be the problem here?
Thank you.
Found issue, created a PullRequest on project :
https://github.com/phonegap-build/PushPlugin/pull/83/files
You should update the code of line 95 and 96 of android/com/plugin/gcm/GCMIntentService.java
.setContentTitle(extras.getString("title"))
.setTicker(extras.getString("title"))

Categories

Resources