【发布时间】:2021-12-13 23:32:38
【问题描述】:
执行静态绑定生成器时出错:文件已存在。这可能导致不良行为。 请更改其中一个扩展类的名称。 文件:C:\repo\geo\geoapp\platforms\android\app\src\main\java\com\tns\FragmentClass.java 类:com.tns.FragmentClass
我不断收到此错误。它首先尝试让@nativescript/geolocation 插件工作。它已编译,但是当调用 geolocation.watchLocation() 方法时应用程序将崩溃。这就是我试图解决的问题。我运行了几次ns clean,重新启动并删除了c:\users\<username>\.gradle 文件夹。当我之前遇到此错误时,删除 .gradle 文件夹有效。
这可能与使用nativescript-google-maps-sdk 插件有关。我相信googlePlayServicesVersion 存在一个已知问题。我也尝试了这些选项,没有任何喜悦。我对应该编辑哪个文件有点困惑;有人提到/app/App_Resources/Android/app.gradle,有人提到app/App_Resources/Android/before-plugins.gradle,我都试过了。
任何建议将不胜感激。
"dependencies": {
"@nativescript/core": "~8.1.1",
"@nativescript/theme": "~3.0.1",
"nativescript-vue": "~2.9.0",
"vuex": "~3.6.2",
"@nativescript/geolocation": "7.0.0",
"@nativescript/directions": "~2.0.1",
"@nativescript/social-share": "~2.0.4",
"@triniwiz/nativescript-couchbase": "~1.2.5",
"@triniwiz/nativescript-toasty": "~4.1.3",
"@bradmartin/nativescript-urlhandler": "~2.0.1",
"nativescript-google-maps-sdk" : "3.0.2",
"nativescript-gif": "~5.0.0"
},
"devDependencies": {
"@nativescript/android": "8.1.1",
"@nativescript/webpack": "~5.0.0",
"nativescript-vue-template-compiler": "~2.9.0",
"@vue/devtools": "^5.3.4",
"@triniwiz/nativescript-toasty": "~4.1.3",
"@triniwiz/nativescript-socketio": "4.0.1",
"nativescript-vue-devtools": "1.5.1"
}
【问题讨论】:
标签: nativescript nativescript-vue nativescript-plugin