Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Pdf 任务';的执行失败:应用程序:transformClassesWithMultidexlistForDebug';。生成主索引列表时出错_Pdf_Dart_Pdf Generation_Dart Pub_Dart Webui - Fatal编程技术网

Pdf 任务';的执行失败:应用程序:transformClassesWithMultidexlistForDebug';。生成主索引列表时出错

Pdf 任务';的执行失败:应用程序:transformClassesWithMultidexlistForDebug';。生成主索引列表时出错,pdf,dart,pdf-generation,dart-pub,dart-webui,Pdf,Dart,Pdf Generation,Dart Pub,Dart Webui,我正在开发一个应用程序,它生成一个pdf,并使用flatter&DART共享这个pdf 我正在我的pubspec.yml文件中导入名为share\u extend:^1.0.3的库,以共享生成的pdf sharePdf.dart async{ 字符串name='John'; PDF发生器(名称); 最终字符串downloadPath=wait getApplicationDocumentsDirectoryPath(); 最终文件=文件(“$downloadPath/$name.pdf”).pa

我正在开发一个应用程序,它生成一个pdf,并使用flatter&DART共享这个pdf

我正在我的
pubspec.yml
文件中导入名为
share\u extend:^1.0.3
的库,以共享生成的pdf

sharePdf.dart

async{
字符串name='John';
PDF发生器(名称);
最终字符串downloadPath=wait getApplicationDocumentsDirectoryPath();
最终文件=文件(“$downloadPath/$name.pdf”).path;
ShareExtend.share(文件,'file');
},
错误:任务“:app:transformClassesWithMultidexlistForDebug”的执行失败。 com.android.build.api.transform.TransformException:生成主索引列表时出错


有人能给我解释一下如何解决这个问题吗?

您需要将项目迁移到AndroidX。

您的依赖关系可能不匹配。我在使用Toast时遇到了这样一个异常,然后我将库迁移到了另一个库,问题得到了解决,实际上主要问题是“Gradle的失败可能是因为这个Flatter应用程序中的AndroidX不兼容”而且我没有发现任何与此兼容的共享文件的依赖项。感谢将android迁移到androidX对我有效