Got compile errors when building android


#1

Hi there,

When I run ionic cordova build android it gives a lot for error when compiling the cordova plugins. Hopefully you guys can see where the issue is. I’ve everything updated.

:app:compileArm64DebugJavaWithJavac
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/cordova/BackgroundGeolocationPlugin.java:563: error: cannot find symbol

    @TargetApi(Build.VERSION_CODES.KITKAT)
                                  ^
  symbol:   variable KITKAT
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/crosswalk/engine/XWalkFileChooser.java:203: error: cannot find symbol
                Environment.DIRECTORY_PICTURES);
                           ^
  symbol:   variable DIRECTORY_PICTURES
  location: class Environment
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:319: error: cannot find symbol
            inAppWebView.onPause();
                        ^
  symbol:   method onPause()
  location: variable inAppWebView of type WebView
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:329: error: cannot find symbol
            inAppWebView.onResume();
                        ^
  symbol:   method onResume()
  location: variable inAppWebView of type WebView
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:374: error: cannot find symbol
                    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
                                                                   ^
  symbol:   variable KITKAT
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:378: error: cannot find symbol
                        inAppWebView.evaluateJavascript(finalScriptToInject, null);
                                    ^
  symbol:   method evaluateJavascript(String,<null>)
  location: variable inAppWebView of type WebView
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:668: error: incompatible types: int cannot be converted to ColorFilter
                    if (closeButtonColor != "") close.setColorFilter(android.graphics.Color.parseColor(closeButtonColor));
                                                                                                      ^
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:672: error: cannot find symbol
                        close.getAdjustViewBounds();
                             ^
  symbol:   method getAdjustViewBounds()
  location: variable close of type ImageButton
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:677: error: cannot find symbol
                RelativeLayout.LayoutParams closeLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT);
                                                                                                                                       ^
  symbol:   variable MATCH_PARENT
  location: class LayoutParams
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:682: error: cannot find symbol
                    _close.setBackground(null);
                          ^
  symbol:   method setBackground(<null>)
  location: variable _close of type View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:720: error: cannot find symbol
                toolbar.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, this.dpToPixels(44)));
                                                                                    ^
  symbol:   variable MATCH_PARENT
  location: class LayoutParams
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:734: error: cannot find symbol
                RelativeLayout.LayoutParams backLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT);
                                                                                                                                      ^
  symbol:   variable MATCH_PARENT
  location: class LayoutParams
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:742: error: incompatible types: int cannot be converted to ColorFilter
                if (navigationButtonColor != "") back.setColorFilter(android.graphics.Color.parseColor(navigationButtonColor));
                                                                                                      ^
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:744: error: cannot find symbol
                    back.setBackground(null);
                        ^
  symbol:   method setBackground(<null>)
  location: variable back of type ImageButton
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:751: error: cannot find symbol
                    back.getAdjustViewBounds();
                        ^
  symbol:   method getAdjustViewBounds()
  location: variable back of type ImageButton
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:761: error: cannot find symbol
                RelativeLayout.LayoutParams forwardLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT);
                                                                                                                             ^
  symbol:   class FileChooserParams
  location: class WebChromeClient
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:886: error: cannot find symbol
                settings.setPluginState(android.webkit.WebSettings.PluginState.ON);
                                                                  ^
  symbol:   variable PluginState
  location: class WebSettings
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:888: error: cannot find symbol
                if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
                                                                                     ^
  symbol:   variable JELLY_BEAN_MR1
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:889: error: cannot find symbol
                    settings.setMediaPlaybackRequiresUserGesture(mediaPlaybackRequiresUserGesture);
                            ^
  symbol:   method setMediaPlaybackRequiresUserGesture(boolean)
  location: variable settings of type WebSettings
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:919: error: cannot find symbol
                if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
                                                                                      ^
  symbol:   variable LOLLIPOP
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:920: error: cannot find symbol
                    CookieManager.getInstance().setAcceptThirdPartyCookies(inAppWebView,true);
                                               ^
  symbol:   method setAcceptThirdPartyCookies(WebView,boolean)
  location: class CookieManager
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:956: error: cannot find symbol
                lp.width = WindowManager.LayoutParams.MATCH_PARENT;
                                                     ^
  symbol:   variable MATCH_PARENT
  location: class LayoutParams

/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:957: error: cannot find symbol
                lp.height = WindowManager.LayoutParams.MATCH_PARENT;
                                                      ^
  symbol:   variable MATCH_PARENT
  location: class LayoutParams
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:1008: error: cannot find symbol
        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                                                       ^
  symbol:   variable LOLLIPOP
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:1015: error: cannot find symbol
            mUploadCallbackLollipop.onReceiveValue(WebChromeClient.FileChooserParams.parseResult(resultCode, intent));
                                                                  ^
  symbol:   variable FileChooserParams
  location: class WebChromeClient
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:1160: error: cannot find symbol
            if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
                                                                                  ^
  symbol:   variable LOLLIPOP
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowser.java:1161: error: cannot find symbol
                CookieManager.getInstance().flush();
                                           ^
  symbol:   method flush()
  location: class CookieManager
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:97: error: cannot find symbol

                    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                                                                    ^
  symbol:   variable KITKAT
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:98: error: cannot find symbol
                        int uiOptions = window.getDecorView().getSystemUiVisibility();
                                                             ^
  symbol:   method getSystemUiVisibility()
  location: class View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:99: error: cannot find symbol
                        uiOptions &= ~View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
                                          ^
  symbol:   variable SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
  location: class View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:100: error: cannot find symbol
                        uiOptions &= ~View.SYSTEM_UI_FLAG_FULLSCREEN;

                                          ^
  symbol:   variable SYSTEM_UI_FLAG_FULLSCREEN
  location: class View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:102: error: cannot find symbol
                        window.getDecorView().setSystemUiVisibility(uiOptions);
                                             ^
  symbol:   method setSystemUiVisibility(int)
  location: class View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:119: error: cannot find symbol
                    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                                                                    ^
  symbol:   variable KITKAT
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:120: error: cannot find symbol
                        int uiOptions = window.getDecorView().getSystemUiVisibility()
                                                             ^
  symbol:   method getSystemUiVisibility()
  location: class View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:121: error: cannot find symbol
                                | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                                      ^
  symbol:   variable SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
  location: class View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:122: error: cannot find symbol
                                | View.SYSTEM_UI_FLAG_FULLSCREEN;
                                      ^
  symbol:   variable SYSTEM_UI_FLAG_FULLSCREEN
  location: class View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:124: error: cannot find symbol
                        window.getDecorView().setSystemUiVisibility(uiOptions);
                                             ^
  symbol:   method setSystemUiVisibility(int)
  location: class View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:234: error: cannot find symbol
                        View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                            ^
  symbol:   variable SYSTEM_UI_FLAG_LAYOUT_STABLE
  location: class View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:235: error: cannot find symbol
                                | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
                                      ^
  symbol:   variable SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
  location: class View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:236: error: cannot find symbol
                window.setStatusBarColor(Color.TRANSPARENT);
                      ^
  symbol:   method setStatusBarColor(int)
  location: variable window of type Window
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:240: error: cannot find symbol
                        View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                            ^
  symbol:   variable SYSTEM_UI_FLAG_LAYOUT_STABLE
  location: class View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:241: error: cannot find symbol
                                | View.SYSTEM_UI_FLAG_VISIBLE);
                                      ^
  symbol:   variable SYSTEM_UI_FLAG_VISIBLE
  location: class View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:247: error: cannot find symbol
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
                                                        ^
  symbol:   variable M
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:250: error: cannot find symbol
                int uiOptions = decorView.getSystemUiVisibility();
                                         ^
  symbol:   method getSystemUiVisibility()
  location: variable decorView of type View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:263: error: cannot find symbol
                    decorView.setSystemUiVisibility(uiOptions | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
                                                                    ^
  symbol:   variable SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
  location: class View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java:268: error: cannot find symbol
                    decorView.setSystemUiVisibility(uiOptions & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
                                                                     ^
  symbol:   variable SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
  location: class View
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/splashscreen/SplashScreen.java:297: error: cannot find symbol
                LayoutParams layoutParams = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
                                                                                      ^
  symbol:   variable MATCH_PARENT
  location: class LayoutParams
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/splashscreen/SplashScreen.java:297: error: cannot find symbol
                LayoutParams layoutParams = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
                                                                                                                 ^
  symbol:   variable MATCH_PARENT
  location: class LayoutParams
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/splashscreen/SplashScreen.java:371: error: cannot find symbol
                if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
                                                                                      ^
  symbol:   variable LOLLIPOP
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/splashscreen/SplashScreen.java:388: error: cannot find symbol
                        progressBar.setIndeterminateTintList(colorStateList);
                                   ^
  symbol:   method setIndeterminateTintList(ColorStateList)
  location: variable progressBar of type ProgressBar
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/device/Device.java:132: error: cannot find symbol
        String serial = android.os.Build.SERIAL;
                                        ^
  symbol:   variable SERIAL
  location: class Build
/Volumes/Projects/mobile/platforms/android/app/src/main/java/org/apache/cordova/globalization/Globalization.java:105: error: cannot find symbol
                if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.GINGERBREAD) {
                                                                                     ^
  symbol:   variable GINGERBREAD
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/io/ionic/keyboard/IonicKeyboard.java:89: error: cannot find symbol
                                display.getSize(size);
                                       ^
  symbol:   method getSize(Point)
  location: variable display of type Display
/Volumes/Projects/mobile/platforms/android/app/src/main/java/nl/xservices/plugins/actionsheet/ActionSheet.java:83: error: cannot find symbol
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
                                                        ^
  symbol:   variable HONEYCOMB
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/nl/xservices/plugins/actionsheet/ActionSheet.java:84: error: constructor Builder in class Builder cannot be applied to given types;
          builder = new AlertDialog.Builder(cordova.getActivity(), theme);
                    ^
  required: Context
  found: Activity,int
  reason: actual and formal argument lists differ in length
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/HttpPostService.java:59: error: cannot find symbol
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                                                        ^
  symbol:   variable KITKAT
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/LocationService.java:189: error: cannot find symbol
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
                                                        ^
  symbol:   variable JELLY_BEAN_MR2
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/LocationService.java:190: error: cannot find symbol
            handlerThread.quitSafely();
                         ^
  symbol:   method quitSafely()
  location: variable handlerThread of type HandlerThread
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/LocationService.java:198: error: method does not override or implement a method from a supertype
    @Override
    ^

/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/LocationService.java:207: error: cannot find symbol
        super.onTaskRemoved(rootIntent);
             ^
  symbol: method onTaskRemoved(Intent)
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/LocationService.java:421: error: cannot find symbol
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
                                                        ^
  symbol:   variable HONEYCOMB
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/LocationService.java:422: error: cannot find symbol
            task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, location);
                                            ^
  symbol:   variable THREAD_POOL_EXECUTOR
  location: class AsyncTask
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/data/BackgroundLocation.java:55: error: cannot find symbol
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
                                                        ^
  symbol:   variable JELLY_BEAN_MR1
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/data/BackgroundLocation.java:56: error: cannot find symbol
            elapsedRealtimeNanos = location.getElapsedRealtimeNanos();
                                           ^
  symbol:   method getElapsedRealtimeNanos()

  location: variable location of type Location
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/data/BackgroundLocation.java:58: error: cannot find symbol
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
                                                        ^
  symbol:   variable JELLY_BEAN_MR2
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/data/BackgroundLocation.java:59: error: cannot find symbol
            isFromMockProvider = location.isFromMockProvider();
                                         ^
  symbol:   method isFromMockProvider()
  location: variable location of type Location
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/data/BackgroundLocation.java:567: error: cannot find symbol
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
                                                        ^
  symbol:   variable JELLY_BEAN_MR1
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/data/BackgroundLocation.java:568: error: cannot find symbol
            l.setElapsedRealtimeNanos(elapsedRealtimeNanos);
             ^
  symbol:   method setElapsedRealtimeNanos(long)
  location: variable l of type Location
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/data/BackgroundLocation.java:592: error: cannot find symbol
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
                                                        ^
  symbol:   variable JELLY_BEAN_MR1
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/sync/SyncService.java:60: error: cannot find symbol
        settingsBundle.putBoolean(ContentResolver.SYNC_EXTRAS_DO_NOT_RETRY, false);
                                                 ^
  symbol:   variable SYNC_EXTRAS_DO_NOT_RETRY
  location: class ContentResolver
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/sync/SyncAdapter.java:71: error: constructor AbstractThreadedSyncAdapter in class AbstractThreadedSyncAdapter cannot be applied to given types;
        super(context, autoInitialize, allowParallelSyncs);
        ^
  required: Context,boolean
  found: Context,boolean,boolean
  reason: actual and formal argument lists differ in length
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/sync/BatchManager.java:70: error: cannot find symbol
            db.beginTransactionNonExclusive();
              ^
  symbol:   method beginTransactionNonExclusive()
  location: variable db of type SQLiteDatabase
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/data/sqlite/SQLiteLocationDAO.java:113: error: method queryNumEntries in class DatabaseUtils cannot be applied to given types;
    return DatabaseUtils.queryNumEntries(db, LocationEntry.TABLE_NAME, whereClause, whereArgs);
                        ^
  required: SQLiteDatabase,String
  found: SQLiteDatabase,String,String,String[]
  reason: actual and formal argument lists differ in length
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/data/sqlite/SQLiteLocationDAO.java:154: error: cannot find symbol
    db.beginTransactionNonExclusive();
      ^
  symbol:   method beginTransactionNonExclusive()
  location: variable db of type SQLiteDatabase
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/data/sqlite/SQLiteOpenHelper.java:118: error: cannot find symbol
        Log.d(TAG, "Creating db: " + this.getDatabaseName());
                                         ^
  symbol: method getDatabaseName()
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/marianhello/bgloc/data/sqlite/SQLiteOpenHelper.java:172: error: method does not override or implement a method from a supertype
    @Override
    ^
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/cordova/BackgroundGeolocationPlugin.java:535: error: cannot find symbol
            activity.bindService(locationServiceIntent, mConnection, Context.BIND_IMPORTANT);
                                                                            ^
  symbol:   variable BIND_IMPORTANT
  location: class Context
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/cordova/BackgroundGeolocationPlugin.java:569: error: cannot find symbol
        return getContext().registerReceiver(locationModeChangeReceiver, new IntentFilter(LocationManager.MODE_CHANGED_ACTION));
                                                                                                         ^
  symbol:   variable MODE_CHANGED_ACTION
  location: class LocationManager
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/cordova/BackgroundGeolocationPlugin.java:585: error: cannot find symbol
        Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
                                           ^
  symbol:   variable ACTION_APPLICATION_DETAILS_SETTINGS
  location: class Settings
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/cordova/BackgroundGeolocationPlugin.java:598: error: cannot find symbol
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                                                        ^
  symbol:   variable KITKAT
  location: class VERSION_CODES
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/cordova/BackgroundGeolocationPlugin.java:599: error: cannot find symbol
            locationMode = Settings.Secure.getInt(context.getContentResolver(), Settings.Secure.LOCATION_MODE);
                                                                                               ^
  symbol:   variable LOCATION_MODE
  location: class Secure
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/cordova/BackgroundGeolocationPlugin.java:600: error: cannot find symbol
            return locationMode != Settings.Secure.LOCATION_MODE_OFF;
                                                  ^
  symbol:   variable LOCATION_MODE_OFF
  location: class Secure
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:148: error: cannot find symbol
            criteria.setHorizontalAccuracy(translateDesiredAccuracy(config.getDesiredAccuracy()));
                    ^
  symbol:   method setHorizontalAccuracy(Integer)
  location: variable criteria of type Criteria
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:166: error: cannot find symbol
                    if (provider != LocationManager.PASSIVE_PROVIDER) {
                                                   ^
  symbol:   variable PASSIVE_PROVIDER
  location: class LocationManager
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:187: error: cannot find symbol
                accuracy = Criteria.ACCURACY_LOW;
                                   ^
  symbol:   variable ACCURACY_LOW
  location: class Criteria
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:190: error: cannot find symbol
                accuracy = Criteria.ACCURACY_MEDIUM;
                                   ^
  symbol:   variable ACCURACY_MEDIUM
  location: class Criteria
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:193: error: cannot find symbol
                accuracy = Criteria.ACCURACY_HIGH;
                                   ^
  symbol:   variable ACCURACY_HIGH
  location: class Criteria
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:196: error: cannot find symbol
                accuracy = Criteria.ACCURACY_HIGH;
                                   ^
  symbol:   variable ACCURACY_HIGH
  location: class Criteria
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:199: error: cannot find symbol
                accuracy = Criteria.ACCURACY_MEDIUM;
                                   ^
  symbol:   variable ACCURACY_MEDIUM
  location: class Criteria
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:463: error: cannot find symbol
             criteria.setHorizontalAccuracy(Criteria.ACCURACY_HIGH);
                                                    ^
  symbol:   variable ACCURACY_HIGH
  location: class Criteria
/Volumes/Projects/mobile/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:467: error: cannot find symbol
                 locationManager.requestSingleUpdate(criteria, singleUpdatePI);
                                ^

#2

Hey!

Can you share the contents of your package.json and config.xml?

Also please post the output from running the commands ionic -v and ionic cordova plugin.

As of right now the errors hint to missing source code files. Android Studio and the Android SDK is installed? Java JDK 8 is also installed?


#3

It has someting to do with updating cordova-android@6.4.0 to Cordova-android@7.0.0.

Here is my packages.json:

{
  "version": "3.0.0",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "PRODUCTION=true ionic-app-scripts build --prod --release",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "PRODUCTION=true ionic-app-scripts build --prod --release",
    "ionic:serve": "ionic-app-scripts serve",
    "test": "ng test",
    "test-coverage": "ng test --code-coverage"
  },
  "dependencies": {
    "@angular/animations": "5.0.1",
    "@angular/common": "5.0.1",
    "@angular/compiler": "5.0.1",
    "@angular/compiler-cli": "5.0.1",
    "@angular/core": "5.0.1",
    "@angular/forms": "5.0.1",
    "@angular/platform-browser": "5.0.1",
    "@angular/platform-browser-dynamic": "5.0.1",
    "@ionic-native/background-geolocation": "4.4.2",
    "@ionic-native/browser-tab": "4.4.2",
    "@ionic-native/core": "4.4.2",
    "@ionic-native/dialogs": "4.4.2",
    "@ionic-native/geolocation": "4.4.2",
    "@ionic-native/keyboard": "4.4.2",
    "@ionic-native/launch-navigator": "4.4.2",
    "@ionic-native/splash-screen": "4.4.2",
    "@ionic-native/status-bar": "4.4.2",
    "@ionic/storage": "2.1.3",
    "@ngx-translate/core": "9.0.2",
    "@ngx-translate/http-loader": "2.0.1",
    "@types/jasmine": "2.5.35",
    "@types/node-forge": "0.6.9",
    "cordova-android": "7.0.0",
    "cordova-plugin-actionsheet": "^2.3.3",
    "cordova-plugin-add-swift-support": "^1.7.1",
    "cordova-plugin-browsertab": "^0.2.0",
    "cordova-plugin-compat": "^1.2.0",
    "cordova-plugin-crosswalk-webview": "^2.4.0",
    "cordova-plugin-device": "^1.1.7",
    "cordova-plugin-geolocation": "^2.4.3",
    "cordova-plugin-globalization": "^1.0.9",
    "cordova-plugin-ionic": "^1.1.9",
    "cordova-plugin-ionic-webview": "^1.1.16",
    "cordova-plugin-mauron85-background-geolocation": "^2.3.3",
    "cordova-plugin-splashscreen": "^4.1.0",
    "cordova-plugin-statusbar": "^2.4.1",
    "cordova-plugin-whitelist": "^1.3.3",
    "intl": "1.2.5",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "lodash": "4.17.4",
    "lodash.clonedeep": "4.5.0",
    "node-forge": "0.7.1",
    "rxjs": "5.5.2",
    "sw-toolbox": "3.6.0",
    "ts-md5": "1.2.0",
    "web-animations-js": "2.3.1",
    "zone.js": "0.8.18"
  },
  "config": {
    "ionic_webpack": "./webpack.config.js"
  },
  "devDependencies": {
    "@angular/cli": "1.6.8",
    "@angular/router": "4.0.2",
    "@ionic/app-scripts": "3.1.4",
    "@types/jasmine": "2.5.54",
    "@types/lodash": "ts2.1",
    "@types/node": "6.0.68",
    "ionic-mocks": "^1.0.4",
    "jasmine-core": "2.6.2",
    "jasmine-reporters": "2.2.1",
    "jasmine-spec-reporter": "3.2.0",
    "karma": "1.7.0",
    "karma-chrome-launcher": "2.1.1",
    "karma-cli": "1.0.1",
    "karma-coverage": "1.1.1",
    "karma-coverage-istanbul-reporter": "1.2.1",
    "karma-intl-shim": "1.0.3",
    "karma-jasmine": "1.1.0",
    "karma-jasmine-html-reporter": "0.2.2",
    "karma-mocha-reporter": "2.2.3",
    "puppeteer": "^1.0.0",
    "string-replace-webpack-plugin": "0.1.3",
    "test": "0.6.0",
    "typescript": "2.4.2"
  },
  "cordova": {
    "plugins": {
      "cordova-plugin-crosswalk-webview": {
        "XWALK_VERSION": "23+",
        "XWALK_LITEVERSION": "xwalk_core_library_canary:17+",
        "XWALK_COMMANDLINE": "--disable-pull-to-refresh-effect",
        "XWALK_MODE": "embedded",
        "XWALK_MULTIPLEAPK": "true"
      },
      "cordova-plugin-device": {},
      "cordova-plugin-geolocation": {
        "GEOLOCATION_USAGE_DESCRIPTION": "Clockwise needs your location for km tracking"
      },
      "cordova-plugin-globalization": {},
      "cordova-plugin-ionic": {
        "APP_ID": "bb7e3516",
        "CHANNEL_NAME": "Production",
        "UPDATE_METHOD": "background",
        "UPDATE_API": "https://api.ionicjs.com",
        "MAX_STORE": "2"
      },
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-mauron85-background-geolocation": {
        "ALWAYS_USAGE_DESCRIPTION": "Clockwise needs background location for km tracking",
        "ACCOUNT_TYPE": "$PACKAGE_NAME.account",
        "CONTENT_AUTHORITY": "$PACKAGE_NAME",
        "ICON": "@mipmap/icon",
        "SMALL_ICON": "@mipmap/icon",
        "ACCOUNT_NAME": "@string/app_name",
        "ACCOUNT_LABEL": "@string/app_name",
        "GOOGLE_PLAY_SERVICES_VERSION": "+"
      },
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-actionsheet": {},
      "cordova-plugin-add-swift-support": {},
      "cordova-plugin-browsertab": {}
    },
    "platforms": [
      "android"
    ]
  }
}

config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="20170915" id="info.clockwise.dev" ios-CFBundleVersion="201709151700" ios-developmentTeam="N23982PK7A" version="3.0.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>ClockWise</name>
    <content src="index.html" />
    <content original-src="index.html" />
    <allow-navigation href="*" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <preference name="webviewbounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="16" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="300" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="3000" />
    <preference name="loadUrlTimeoutValue" value="700000" />
    <platform name="android">
        <allow-intent href="market:*" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
        <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
        <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
    </platform>
    <preference name="orientation" value="portrait" />
    <preference name="SplashScreenBackgroundColor" value="#ff8d00" />
    <preference name="AutoHideSplashScreen" value="false" />
    <icon src="resources/android/icon/drawable-xhdpi-icon.png" />
    <plugin name="cordova-plugin-crosswalk-webview" spec="^2.3.0">
        <variable name="XWALK_VERSION" value="23+" />
        <variable name="XWALK_LITEVERSION" value="xwalk_core_library_canary:17+" />
        <variable name="XWALK_COMMANDLINE" value="--disable-pull-to-refresh-effect" />
        <variable name="XWALK_MODE" value="embedded" />
        <variable name="XWALK_MULTIPLEAPK" value="true" />
    </plugin>
    <plugin name="cordova-plugin-device" spec="^1.1.7" />
    <plugin name="cordova-plugin-geolocation" spec="^2.4.3">
        <variable name="GEOLOCATION_USAGE_DESCRIPTION" value="Clockwise needs your location for km tracking" />
    </plugin>
    <plugin name="cordova-plugin-globalization" spec="^1.0.8" />
    <plugin name="cordova-plugin-ionic" spec="^1.1.9">
        <variable name="APP_ID" value="bb7e3516" />
        <variable name="CHANNEL_NAME" value="Production" />
        <variable name="UPDATE_METHOD" value="background" />
        <variable name="UPDATE_API" value="https://api.ionicjs.com" />
        <variable name="MAX_STORE" value="2" />
    </plugin>
    <plugin name="cordova-plugin-ionic-webview" spec="^1.1.16" />
    <plugin name="cordova-plugin-mauron85-background-geolocation" spec="^2.3.3">
        <variable name="ALWAYS_USAGE_DESCRIPTION" value="Clockwise needs background location for km tracking" />
        <variable name="ACCOUNT_TYPE" value="$PACKAGE_NAME.account" />
        <variable name="CONTENT_AUTHORITY" value="$PACKAGE_NAME" />
        <variable name="ICON" value="@mipmap/icon" />
        <variable name="SMALL_ICON" value="@mipmap/icon" />
        <variable name="ACCOUNT_NAME" value="@string/app_name" />
        <variable name="ACCOUNT_LABEL" value="@string/app_name" />
    </plugin>
    <plugin name="cordova-plugin-splashscreen" spec="^4.1.0" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
    <plugin name="cordova-plugin-statusbar" spec="^2.3.0" />
    <plugin name="cordova-plugin-actionsheet" spec="^2.3.3" />
    <plugin name="cordova-plugin-add-swift-support" spec="^1.7.0" />
    <plugin name="cordova-plugin-browsertab" spec="^0.2.0" />
    <engine name="android" spec="7.0.0" />
</widget>

#4

Hi

Try the fix here https://github.com/mauron85/cordova-plugin-background-geolocation/issues/362

Edit the build.gradle
platform/android/app/build.gradle

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}


#5

We did remove crosswalk, that solved the problem.