简体   繁体   中英

ionic build error - cordova-file plugin issue

I am having trouble - creating an android build using ionic. It was initially working fine. I tried changing the android target platform to 19 - thats 4.4.2 kitkat.

this is the error message- apparently there is an issue with the cordova file plugin. When I change the platform sdk target to 19 .

Any help will be appreciated here.

/myapp/platforms/android/src/org/apache/cordova/file/LocalFilesystem.java:414: error: cannot find symbol if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { ^ symbol: variable LOLLIPOP location: class VERSION_CODES /myapp/platforms/android/src/org/apache/cordova/file/LocalFilesystem.java:416: error: cannot find symbol for (File f : context.getExternalMediaDirs()) { ^ symbol: method getExternalMediaDirs() location: variable context of type Context 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. 2 errors FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':compileReleaseJava'.

    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.

Figured it out, just remove and add the android platform back. And then its smooth sailing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM