Error executing Static Binding Generator: File already exists. This may lead to undesired behavior. Please change the name of one of the extended classes. File:C:\repo\geo\geoapp\platforms\android\app\src\main\java\com\tns\FragmentClass.java Class: com.tns.FragmentClass
I keep getting this error. It started with trying to get the @nativescript/geolocation
plug-in to work. It compiled, however the app will crash when the geolocation.watchLocation()
method was called. This is what I was trying to fix. I ran the ns clean
a few times, rebooted, and delete the c:\users\<username>\.gradle
folder. Deleting the .gradle folder worked when I had this error before.
It could be something to do with also using the nativescript-google-maps-sdk
plug-in. I believe there is a know issue with the the googlePlayServicesVersion
. I tried those options as well without any joy. I am a bit confused to which file I should edit; some mention /app/App_Resources/Android/app.gradle
, others app/App_Resources/Android/before-plugins.gradle
, I tried both.
Any advise will be much appreciated.
"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"
}