帖子
帖子
用户
博客
课程
12下一页
返回列表 发新帖
显示全部楼层
129
帖子
7
勋章
1万+
Y币

[插件开发] SDK工程中可以运行打包自定义组件使用没生效

[复制链接]
发表于 2024-4-10 10:40:30
使用kotlin开发的原生插件,SDK工程中可以正常运行,打包自定义插件打包进项目调用插件中的方法没执行,也没有任何的报错信息,引用了自定义插件打包自定义loader也打包成功了,我应该怎么调试才能查到问题,自定义插件的zip包里module.json   moduleDialog.arr两个文件,是缺少什么文件吗
你的插件没有用别的第三方包吗
129
帖子
7
勋章
1万+
Y币
勇可可【1161277121】 · 2024-4-10 10:41你的插件没有用别的第三方包吗

没有用第三方包,我看别人有个帖子也是kotlin开发,说是需要在压缩包里放kotlin的jar包,我是也需要放吗?kotlin的jar包在哪里找
130
帖子
7
勋章
5万+
Y币
颓废小岩 · 2024-4-10 10:46没有用第三方包,我看别人有个帖子也是kotlin开发,说是需要在压缩包里放kotlin的jar包,我是也需要放吗?kotlin的jar包在哪里找

需要的
129
帖子
7
勋章
1万+
Y币

具体的呢   
1.也是建个source文件夹放在压缩包里
2。然后把jar扔在source这个文件夹里,是这个流程吗?
应该在开发工具的哪个文件夹下能找到kotlin需要的这个jar包?
130
帖子
7
勋章
5万+
Y币
颓废小岩 · 2024-4-10 11:19具体的呢   
1.也是建个source文件夹放在压缩包里
2。然后把jar扔在source这个文件夹里,是这个流程吗?

说的对,百度一下在哪里下载,就在你电脑上的文件里
129
帖子
7
勋章
1万+
Y币
Arly【770104707】 · 2024-4-10 11:37说的对,百度一下在哪里下载,就在你电脑上的文件里

找到了,放压缩包里了   调用也还是没执行  也没有任何的报错   我应该检查什么配置啥的吗   还是需要添加其他的jar包,我没有用任何的第三发库,source里放了kotlin-compiler-embeddable-1.9.0.jar
129
帖子
7
勋章
1万+
Y币
Arly【770104707】 · 2024-4-10 11:37说的对,百度一下在哪里下载,就在你电脑上的文件里

jar包放完之后有报错日志了
2024-04-10 02:12:23
/data/engine/android/projects/new_8/AStudioProject/app/libs/kotlin-compiler-embeddable-1.9.0.jar: D8: MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26)

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:javaPreCompileRelease'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Annotation processors must be explicitly declared now.  The following dependencies on the compile classpath are found to contain annotation processor.  Please add them to the annotationProcessor configuration.
       - kotlin-compiler-embeddable-1.9.0.jar (kotlin-compiler-embeddable-1.9.0.jar)
     Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior.  Note that this option is deprecated and will be removed in the future.
     See https://developer**.**/r/tools/a ... -error-message.html 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:desugarReleaseFileDependencies'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Error while dexing.

* 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.
==============================================================================

* Get more help at https://help**.**

BUILD FAILED in 1m 5s
129
帖子
7
勋章
1万+
Y币
Arly【770104707】 · 2024-4-10 11:37说的对,百度一下在哪里下载,就在你电脑上的文件里

按照此方法打包失败了   有报错日志了

c3ab77e48bf0ccd18a1501f973390253.zip 下载附件
2024-4-10 14:19上传969 Bytes下载次数: 4
截图下你插件和app的build.gradle
12下一页
您需要登录后才可以回帖 登录

本版积分规则