Drew
Drew

Reputation: 1361

Unable to Run Ionic Cordova Android Emulator

I have been trying to run my ionic app in the android emulator and am getting continuous errors around some sort of versioning. Below is the error I am getting when I run sudo ionic cordova emulate android

:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/Users/DrewGelinas/Desktop/lndFinal/platforms/android/src/org/chromium/customtabsclient/shared/CustomTabsHelper.java:77: error: diamond operator is not supported in -source 1.6

        List<String> packagesSupportingCustomTabs = new ArrayList<>();

                                                                  ^
  (use -source 7 or higher to enable diamond operator)
/Users/DrewGelinas/Desktop/lndFinal/platforms/android/src/org/chromium/customtabsclient/shared/ServiceConnection.java:32: error: diamond operator is not supported in -source 1.6

        mConnectionCallback = new WeakReference<>(connectionCallback);
                                                ^
  (use -source 7 or higher to enable diamond operator)
2 errors

:compileDebugJavaWithJavac 
FAILED

FAILURE: Build failed with an exception.

I have checked android studio and the most recent android SDK and the sdk tools are all installed. I have also checked the JAVA_HOME variable and it is set to the proper place running java 1.8. I can't figure out what this issue is, or what is causing it.

Upvotes: 1

Views: 415

Answers (3)

BRass
BRass

Reputation: 3838

If you're like me, you may need to keep the Safari View Controller plugin. Removing wasn't an option. Upgrading from 1.4.7 to 1.5.3 got rid of this error for me.

Upvotes: 0

Blakey UK
Blakey UK

Reputation: 63

As with Alex Steinberg, removing the Safari View Controller worked for me as well on an ionic build.

Upvotes: 0

Alex Steinberg
Alex Steinberg

Reputation: 1466

Removing the Safari View Controller native plugin solved it for me. Try either updating it or removing it. I use the In App Browser and it works great. Project in question uses ionic-angular 3.8.0 and Angular 4.4.4.

Upvotes: 1

Related Questions