0

I have created an android application and added the solution to my TFS where a release build can be triggered manually. This method of building have been carried out multiple times without fail until recently after I updated my SDKs (via Android SDK manager).

Below is the partial errors in the build log:

obj\Release\android\src\md53155e6cb61623bc450db3eaf793ee42d\CadMap.java(8,30): javac.exe error :  error: cannot find symbol [C:\Builds\CAD Client\Mobile\CadMobile2.Droid\CadMobile2.Droid.csproj]
obj\Release\android\src\md53155e6cb61623bc450db3eaf793ee42d\CadMap.java(8,30): javac.exe error :        com.google.android.gms.maps.OnMapReadyCallback [C:\Builds\CAD Client\Mobile\CadMobile2.Droid\CadMobile2.Droid.csproj]
obj\Release\android\src\md53155e6cb61623bc450db3eaf793ee42d\CadMap.java(8,30): javac.exe error :   symbol:   class OnMapReadyCallback [C:\Builds\CAD Client\Mobile\CadMobile2.Droid\CadMobile2.Droid.csproj]
obj\Release\android\src\md53155e6cb61623bc450db3eaf793ee42d\CadMap.java(8,30): javac.exe error :   location: package com.google.android.gms.maps [C:\Builds\CAD Client\Mobile\CadMobile2.Droid\CadMobile2.Droid.csproj]
obj\Release\android\src\md53155e6cb61623bc450db3eaf793ee42d\CadMap.java(8,30): javac.exe error :  [C:\Builds\CAD Client\Mobile\CadMobile2.Droid\CadMobile2.Droid.csproj]
  obj\Release\android\src\md53155e6cb61623bc450db3eaf793ee42d\CadMap.java(64,53): javac.exe error :  error: cannot find symbol [C:\Builds\CAD Client\Mobile\CadMobile2.Droid\CadMobile2.Droid.csproj]
obj\Release\android\src\md53155e6cb61623bc450db3eaf793ee42d\CadMap.java(64,53): javac.exe error :   public void onMapReady (com.google.android.gms.maps.GoogleMap p0) [C:\Builds\CAD Client\Mobile\CadMobile2.Droid\CadMobile2.Droid.csproj]
obj\Release\android\src\md53155e6cb61623bc450db3eaf793ee42d\CadMap.java(64,53): javac.exe error :   symbol:   class GoogleMap [C:\Builds\CAD Client\Mobile\CadMobile2.Droid\CadMobile2.Droid.csproj]
obj\Release\android\src\md53155e6cb61623bc450db3eaf793ee42d\CadMap.java(64,53): javac.exe error :   location: package com.google.android.gms.maps [C:\Builds\CAD Client\Mobile\CadMobile2.Droid\CadMobile2.Droid.csproj]
obj\Release\android\src\md53155e6cb61623bc450db3eaf793ee42d\CadMap.java(64,53): javac.exe error :  [C:\Builds\CAD Client\Mobile\CadMobile2.Droid\CadMobile2.Droid.csproj]
  obj\Release\android\src\md53155e6cb61623bc450db3eaf793ee42d\CadMap.java(69,63): javac.exe error :  error: cannot find symbol [C:\Builds\CAD Client\Mobile\CadMobile2.Droid\CadMobile2.Droid.csproj]
obj\Release\android\src\md53155e6cb61623bc450db3eaf793ee42d\CadMap.java(69,63): javac.exe error :   private native void n_onMapReady (com.google.android.gms.maps.GoogleMap p0); [C:\Builds\CAD Client\Mobile\CadMobile2.Droid\CadMobile2.Droid.csproj]
obj\Release\android\src\md53155e6cb61623bc450db3eaf793ee42d\CadMap.java(69,63): javac.exe error :   symbol:   class GoogleMap [C:\Builds\CAD Client\Mobile\CadMobile2.Droid\CadMobile2.Droid.csproj]
obj\Release\android\src\md53155e6cb61623bc450db3eaf793ee42d\CadMap.java(69,63): javac.exe error :   location: package com.google.android.gms.maps [C:\Builds\CAD Client\Mobile\CadMobile2.Droid\CadMobile2.Droid.csproj]
obj\Release\android\src\md53155e6cb61623bc450db3eaf793ee42d\CadMap.java(69,63): javac.exe error :  [C:\Builds\CAD Client\Mobile\CadMobile2.Droid\CadMobile2.Droid.csproj]

I have re-installed JAVA, SDK, NDK, checked that the solution is buildable on my local machine with VS2015. However the error is still persisting.

TFS Machine Versions

VS2015, 4.6.01590 Xamarin, 4.2.2.11 Xamarin.Android, 7.0.2.42 Android NDK, android-ndk-r13b Android SDK, v25.2.3 tools Other Xamarin packages, v23.1.1.x

How do I proceed from here?

Ed L 005
  • 157
  • 3
  • 14
  • Which version of TFS are you using? Can you share your build definition and detailed log? At which step did you get this error? If you run the solution manually on your build agent machine, how's the result? – Cece Dong - MSFT Feb 23 '17 at 02:47
  • TFS 2013, Link to error log: https://drive.google.com/file/d/0B-xFId14iS0cek4wbDNvdVQ0UDA/view I have also tried uninstalling API 24 (another build, but same outcome) due to this issue, https://releases.xamarin.com/technical-bulletin-android-sdk-build-tools-24/. Building locally with VS2015 is successful (APK can be installed to device and run). – Ed L 005 Feb 23 '17 at 05:07
  • Please try to login your build agent machine, and run the solution locally to see whether you would get the same error. Also, try to clean the cache folder on your build agent machine: C:\Users\username\AppData\Local\Microsoft\Team Foundation\5.0\Cache. – Cece Dong - MSFT Feb 23 '17 at 07:56
  • Did you restart the build service after update the SDK? – Eddie Chen - MSFT Mar 01 '17 at 01:48
  • Sorry for the late reply, had to shift priorities a bit. Yes, the build service was restarted. Ran against Android SDK 25.2.3, NDK r10d & r13b. – Ed L 005 Mar 06 '17 at 07:36
  • https://drive.google.com/open?id=0B-xFId14iS0ceTNhOG5Mckw1bFk The above image shows TFS pointing to referenced path for the JAVA file. However the actual file was found in `C:\Builds\1\SERIS-CAD\CADMob - CAD Rel 2\src\Branches\SC-2.4.0.5 Release2 20161122\CAD Client\Mobile\CadMobile2.Droid\obj\Release` Does `~\CADMob - CAD Rel 2\src\~` matter in this referencing? – Ed L 005 Mar 07 '17 at 00:43
  • http://stackoverflow.com/questions/40012256/vsts-build-definition-for-android-failing I am expriencing the same error as @MikePR. Apparently the solution is to specify JDK version in Xamarin.Android step of build definition. However I am new to this TFS setup/configure procedure. How do I proceed to specify JDK version? – Ed L 005 Mar 08 '17 at 07:14

0 Answers0