0

Hello StackOverflow Users,

i have a Xamarin.Android project and i want to switch to VS2019 after being stuck on VS2015. However i can't build the project. Whenever i build the project, i get the following error:

error: cannot find symbol
            String[] splitApks = applicationInfo.splitPublicSourceDirs;
  symbol:   variable splitPublicSourceDirs
  location: variable applicationInfo of type ApplicationInfo

I tried stuff like enabling packages specific to ABIs, switching the dex compiler, deleting the /bin and /obj directories but none of these changed anything. I also looked up the message on Google, but i didn't find anything relevant.

AlphaNERD
  • 155
  • 1
  • 1
  • 9
  • Hi , do you have a check with SDK , or update it in VS 2019 . And having a checking with this dicussion to find the reason .https://stackoverflow.com/questions/25706216/what-does-a-cannot-find-symbol-or-cannot-resolve-symbol-error-mean – Junior Jiang Nov 21 '19 at 05:42
  • Thank you Junior Jiang. As it turned out, i could work around this issue by selecting a different target SDK. – AlphaNERD Nov 26 '19 at 09:23
  • Glad to hear that ! May I edit this as an answer ? – Junior Jiang Nov 26 '19 at 09:26

1 Answers1

0

So i found a solution or rather a workaround myself.

I tried to change the target SDK and as it turned out this fixed my build. I couldn't build the app with the Android 4.4 SDK. However i could build the app without a hitch with any other target SDK starting with Android 5.0. You can set the target SDK in the Project Settings -> Application.

AlphaNERD
  • 155
  • 1
  • 1
  • 9