epub_kitty icon indicating copy to clipboard operation
epub_kitty copied to clipboard

com.fasterxml.jackson.core.type does not exist

Open sgehrman opened this issue 4 years ago • 3 comments

Launching lib/main.dart on Android SDK built for x86 64 in debug mode... Note: /home/steve/google/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-4.2.0+hotfix.3/android/src/main/java/com/baseflow/permissionhandler/PermissionHandlerPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /home/steve/google/flutter/.pub-cache/hosted/pub.dartlang.org/epub_kitty-0.1.0/android/src/main/java/com/xiaofwang/epub_kitty/Reader.java:6: error: package com.fasterxml.jackson.core.type does not exist import com.fasterxml.jackson.core.type.TypeReference; ^ /home/steve/google/flutter/.pub-cache/hosted/pub.dartlang.org/epub_kitty-0.1.0/android/src/main/java/com/xiaofwang/epub_kitty/Reader.java:7: error: package com.fasterxml.jackson.databind does not exist import com.fasterxml.jackson.databind.ObjectMapper; ^ /home/steve/google/flutter/.pub-cache/hosted/pub.dartlang.org/epub_kitty-0.1.0/android/src/main/java/com/xiaofwang/epub_kitty/Reader.java:92: error: cannot find symbol ObjectMapper objectMapper = new ObjectMapper(); ^ symbol: class ObjectMapper /home/steve/google/flutter/.pub-cache/hosted/pub.dartlang.org/epub_kitty-0.1.0/android/src/main/java/com/xiaofwang/epub_kitty/Reader.java:92: error: cannot find symbol ObjectMapper objectMapper = new ObjectMapper(); ^ symbol: class ObjectMapper /home/steve/google/flutter/.pub-cache/hosted/pub.dartlang.org/epub_kitty-0.1.0/android/src/main/java/com/xiaofwang/epub_kitty/Reader.java:96: error: cannot find symbol new TypeReference<List<HighlightData>>() { ^ symbol: class TypeReference Note: /home/steve/google/flutter/.pub-cache/hosted/pub.dartlang.org/epub_kitty-0.1.0/android/src/main/java/com/xiaofwang/epub_kitty/EpubKittyPlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 5 errors

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':epub_kitty:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:

sgehrman avatar Feb 26 '20 07:02 sgehrman

A problem occurred configuring root project 'epub_kitty'.

SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

sgehrman avatar Feb 26 '20 07:02 sgehrman

The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.

sgehrman avatar Feb 26 '20 07:02 sgehrman

I solved this by opening folder android with Android Studio and waiting for Android Studio to build them. Then I went to Grandle Scrips> build.grandle (Module: epub_kitty) and added two lines under into dependencies.

implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.8' implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.7'

Good luck!!!!

DatUET avatar Mar 18 '20 19:03 DatUET