darryncampbell / darryncampbell-cordova-plugin-intent

General purpose intent shim layer for cordova appliations on Android. Handles various techniques for sending and receiving intents.
MIT License
86 stars 136 forks source link

Breaks build when invoking "ionic cordova run android" #90

Closed YoJer closed 4 years ago

YoJer commented 4 years ago

Hello,

When I add WebIntent to my project, per Ionic docs: https://ionicframework.com/docs/v3/native/web-intent/

I get the following errors:

BUILD FAILED in 7s

Task :app:compileDebugJavaWithJavac FAILED 24 actionable tasks: 1 executed, 23 up-to-date C:\code\testApp\platforms\android\gradlew: Command failed with exit code 1 Error output: C:\code\testApp\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; ^ C:\code\testApp\platforms\android\app\src\main\java\com\ionicframework\cordova\webview\IonicWebViewEngine.java:122: error: cannot find symbol @RequiresApi(Build.VERSION_CODES.LOLLIPOP) ^ symbol: class RequiresApi location: class IonicWebViewEngine.ServerClient Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

I'm rather new to both Ionic and Angular, so apologies if this isn't related to your package. I'm trying to develop a simple scanning app for a Zebra scanner.

Thank you,

Jeremy

darryncampbell commented 4 years ago

Hi Jeremy, it looks like the latest changes to this plugin broke something in WebIntent & I don't really understand it - there was a related issue https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent/issues/84 where I explained a bit more but I am not very familiar with Ionic Native.

Per that issue, it looks like you can use the plugin directly. Also, if you haven't seen them already I did a Ionic sample app a while back for Zebra devices https://github.com/Zebra/ZebraIonicDemo and there is also a blog post https://developer.zebra.com/community/home/blog/2018/04/03/ionic-applications-on-zebra-devices and webinar https://www.youtube.com/watch?v=zuHkqGocOqE on the subject

YoJer commented 4 years ago

Daryn,

Thank you for your prompt response. I've reviewed you blog article as well. I'm getting an unusual error when I try to build the sample app as well.

I think I may need to use an older version of Ionic.

Thank you,

Jeremy

darryncampbell commented 4 years ago

Thanks for the feedback Jeremy. I have a reminder in my calendar to try and update the Ionic sample app between Christmas and the New year when it is quieter in the office so hopefully I will get this resolved then

pviera commented 4 years ago

Hello,

When I add WebIntent to my project, per Ionic docs: https://ionicframework.com/docs/v3/native/web-intent/

I get the following errors:

BUILD FAILED in 7s

Task :app:compileDebugJavaWithJavac FAILED 24 actionable tasks: 1 executed, 23 up-to-date C:\code\testApp\platforms\android\gradlew: Command failed with exit code 1 Error output: C:\code\testApp\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; ^ C:\code\testApp\platforms\android\app\src\main\java\com\ionicframework\cordova\webview\IonicWebViewEngine.java:122: error: cannot find symbol @RequiresApi(Build.VERSION_CODES.LOLLIPOP) ^ symbol: class RequiresApi location: class IonicWebViewEngine.ServerClient Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

I'm rather new to both Ionic and Angular, so apologies if this isn't related to your package. I'm trying to develop a simple scanning app for a Zebra scanner.

Thank you,

Jeremy

Hi, could you solve the problem and how?

Syed-Musthafa commented 4 years ago

I had a same issue, anyone has a solution