我正在将本机脚本从5.3迁移到6.0.1,并获得支持库错误。
Gradle build ... +设置applicationId +应用C:\ Users \ parth.maisheri \ native-repo \ unite(2.0 final-realese)\ unite \ app \ App_Resources \ Android \ app.gradle 从C:\ Users \ parth.maisheri \ native-repo \ unite(2.0 final-realese)\ unite \ app \ App_Resources \ Android \ settings.json +使用Andorid X库androidx.legacy:legacy-support-v4:1.0.0 +添加nativescript运行时包依赖项:nativescript-optimized-with-inspector +添加aar插件依赖项:C:\ Users \ parth.maisheri \ native-repo \ unite(2.0 final-realese)\ unite \ node_modules \ nativescript-background-http \ platforms \ android \ nativescript_background_http.aar +添加aar插件依赖项:C:\ Users \ parth.maisheri \ native-repo \ unite(2.0 final-realese)\ unite \ node_modules \ nativescript-camera \ platforms \ android \ nativescript_camera.aar +添加aar插件依赖项:C:\ Users \ parth.maisheri \ native-repo \ unite(2.0 final-realese)\ unite \ node_modules \ nativescript-imagepicker \ platforms \ android \ nativescript_imagepicker.aar +添加aar插件依赖项:C:\ Users \ parth.maisheri \ native-repo \ unite(2.0 final-realese)\ unite \ node_modules \ nativescript-loading-indicator \ platforms \ android \ nativescript_loading_indicator.aar +添加aar插件依赖项:C:\ Users \ parth.maisheri \ native-repo \ unite(2.0 final-realese)\ unite \ node_modules \ nativescript-plugin-firebase \ platforms \ android \ firebase-release.aar +添加aar插件依赖项:C:\ Users \ parth.maisheri \ native-repo \ unite(2.0 final-realese)\ unite \ node_modules \ nativescript-plugin-firebase \ platforms \ android \ nativescript_plugin_firebase.aar +添加jar插件依赖项:C:\ Users \ parth.maisheri \ native-repo \ unite(2.0 final-realese)\ unite \ node_modules \ nativescript-webview-interface \ platforms \ android \ WebViewInterface.jar +添加aar插件依赖项:C:\ Users \ parth.maisheri \ native-repo \ unite(2.0 Final-realese)\ unite \ node_modules \ tns-core-modules-widgets \ platforms \ android \ widgets-release.aar registerResGeneratingTask已弃用,请使用 registerGeneratedResFolders(FileCollection)registerResGeneratingTask 弃用,请使用registerGeneratedResFolders(FileCollection) 线程“主”中的异常java.lang.RuntimeException:找不到类 android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener 在org.nativescript.staticbindinggenerator.Generator.getClass(Generator.java:549) 在org.nativescript.staticbindinggenerator.Generator.getInterfacesFromCache(Generator.java:532) 在org.nativescript.staticbindinggenerator.Generator.writeBinding(Generator.java:283) 在org.nativescript.staticbindinggenerator.Generator.generateBinding(Generator.java:171) 在org.nativescript.staticbindinggenerator.Generator.processRows(Generator.java:234) 在org.nativescript.staticbindinggenerator.Generator.generateBindings(Generator.java:121) 在org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:97) 在org.nativescript.staticbindinggenerator.Main.main(Main.java:50)
失败:构建失败,并出现异常。
处理'命令'C:\ Program Files \ Java \ jdk1.8.0_181 \ bin \ java.exe''完成,退出值非零1
答案 0 :(得分:0)
我收到此错误是因为我正在使用不赞成使用的组件
请确保您使用的是@nstudio/nativescript-pulltorefresh组件(而不是已弃用的“ nativescript-pulltorefresh”)。
运行此命令以添加插件:
tns plugin add @nstudio/nativescript-pulltorefresh
如果是,请将其更新为最新版本
然后检查是否正确引用了正确的组件
registerElement("PullToRefresh", () => require("@nstudio/nativescript-pulltorefresh").PullToRefresh);