gstory0404 / file_preview

A plug-in that supports flutter preview files,Flutter文档预览

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

启动不起来

zhaohuanhui opened this issue · comments

e: C:\Users\Administrator\Desktop\file_preview-master\android\src\main\kotlin\com\gstory\file_preview\FilePreviewFactory.kt: (16, 10): Class 'FilePreviewFactory' is not abstract and does not implement abstract base class member public abstract fun create(p0: Context?, p1: Int, p2: Any?): PlatformView defined in io.flutter.plugin.platform.PlatformViewFactory
e: C:\Users\Administrator\Desktop\file_preview-master\android\src\main\kotlin\com\gstory\file_preview\FilePreviewFactory.kt: (18, 5): 'create' overrides nothing

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':file_preview:compileDebugKotlin'.

Compilation error. See log for more details

没办法启动你这个项目

demo运行不起来吗?更新一下android studio kotlin插件版本试试

commented

@zhaohuanhui 我跟你遇到一样的问题了,你这解决了吗

commented

@gstory0404 kotlin更新了也不行

flutter doctor看一下 @Tsick

commented

image

flutter channel stable 切换到stable试一下 @Tsick

commented

@gstory0404 可以运行了

commented

@gstory0404 又出现这个问题了,kotlin和flutter版本都是之前的

e: D:\flutter.pub-cache\hosted\pub.flutter-io.cn\file_preview-1.0.2\android\src\main\kotlin\com\gstory\file_preview\FilePreview.kt: (24, 16): Redeclaration: FilePreview
e: D:\flutter.pub-cache\hosted\pub.flutter-io.cn\file_preview-1.0.2\android\src\main\kotlin\com\gstory\file_preview\FilePreviewPlugin.kt: (23, 7): Redeclaration: FilePreviewPlugin
e: D:\flutter.pub-cache\hosted\pub.flutter-io.cn\file_preview-1.0.2\android\src\main\kotlin\com\gstory\file_preview\TbsManager.kt: (11, 7): Redeclaration: TbsManager
e: D:\flutter.pub-cache\hosted\pub.flutter-io.cn\file_preview-1.0.2\android\src\main\kotlin\com\gstory\file_preview\TbsManager.kt: (84, 11): Redeclaration: InitCallBack
e: D:\flutter.pub-cache\hosted\pub.flutter-io.cn\file_preview-1.0.2\android\src\main\kotlin\com\gstory\file_preview\utils\FileUtils.kt: (21, 8): Redeclaration: FileUtils
e: D:\flutter.pub-cache\hosted\pub.flutter-io.cn\file_preview-1.0.3\android\src\main\kotlin\com\gstory\file_preview\FilePreview.kt: (25, 16): Redeclaration: FilePreview
e: D:\flutter.pub-cache\hosted\pub.flutter-io.cn\file_preview-1.0.3\android\src\main\kotlin\com\gstory\file_preview\FilePreviewPlugin.kt: (24, 7): Redeclaration: FilePreviewPlugin
e: D:\flutter.pub-cache\hosted\pub.flutter-io.cn\file_preview-1.0.3\android\src\main\kotlin\com\gstory\file_preview\FilePreviewPlugin.kt: (78, 23): Unresolved reference: deleteCache
e: D:\flutter.pub-cache\hosted\pub.flutter-io.cn\file_preview-1.0.3\android\src\main\kotlin\com\gstory\file_preview\TbsManager.kt: (11, 7): Redeclaration: TbsManager
e: D:\flutter.pub-cache\hosted\pub.flutter-io.cn\file_preview-1.0.3\android\src\main\kotlin\com\gstory\file_preview\TbsManager.kt: (18, 13): Cannot access '': it is private in 'TbsManager'
e: D:\flutter.pub-cache\hosted\pub.flutter-io.cn\file_preview-1.0.3\android\src\main\kotlin\com\gstory\file_preview\TbsManager.kt: (86, 11): Redeclaration: InitCallBack
e: D:\flutter.pub-cache\hosted\pub.flutter-io.cn\file_preview-1.0.3\android\src\main\kotlin\com\gstory\file_preview\utils\FileUtils.kt: (21, 8): Redeclaration: FileUtils

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':file_preview:compileDebugKotlin'.

Compilation error. See log for more details

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
commented

自己找到办法了,flutter clean后,再flutter pub get就好了