4 Replies Latest reply on Jul 13, 2016 4:01 AM by Andre Heine

    gradle plugin 2.10.0 Sync fails (failed to find target with hash string 'Symbol Technologies, Inc.:EMDK 3.1 (API 19):19')

    Andre Heine

      Hello all,

       

      after update gradle to 2.10.0 sync will fail with error (1.5.0 will work):

       

      failed to find target with hash string 'Symbol Technologies, Inc.:EMDK 3.1 (API 19):19'
      

       

       

      I spent a huge time to solve this. May it will help you...

       

      My build.gradle uses the target (described in docs by zebra):

       

      compileSdkVersion 'Symbol Technologies, Inc.:EMDK 3.1 (API 19):19'

       

       

      Problem:

       

      The EMDK in my android SDK has these files in the top directory:

       

      localhost:addon-symbol_emdk-symbol-19 ah$ ls -l
      total 24
      drwxr-xr-x  3 ah  staff   102 24 Jun  2015 docs
      drwxr-xr-x  3 ah  staff   102 24 Jun  2015 libs
      -rw-r--r--  1 ah  staff   773 18 Jun  2015 manifest.ini
      -rw-r--r--  1 ah  staff  1169 13 Jul 07:43 package.xml
      -rw-r--r--  1 ah  staff   421 13 Jul 07:42 source.properties
      localhost:addon-symbol_emdk-symbol-19 ah$ 
      

       

      A deeper look into source.properties shows the main problem here.

      ### Android Tool: Source of this archive.
      #Wednesday June 17,2015
      Addon.NameId=symbol_emdk
      Pkg.Desc=Android + EMDK APIs
      Addon.VendorId=symbol
      Addon.Vendor=Symbol Technologies, Inc.
      Pkg.License=""
      Pkg.LicenseRef=""
      Pkg.DescUrl=""
      Archive.Arch=ANY
      Addon.NameDisplay=EMDK 3.1 (API 19)
      Addon.VendorDisplay="Symbol Technologies, Inc."
      Archive.Os=ANY
      Pkg.SourceUrl=""
      Pkg.Revision=38
      AndroidVersion.ApiLevel=19              
      

       

      I found two possible ways to solve it.

       

      See the line with the key "Addon.VendorDisplay". Remove the double quotes and delete the package.xml.

       

      Addon.VendorDisplay=Symbol Technologies, Inc.
      

       

      Run your sync again. The package.xml will re-created and my project was build.

       

      Alternatively leave the files untouched and modify your build.gradle instead.

       

      compileSdkVersion '"Symbol Technologies, Inc.":EMDK 3.1 (API 19):19'

       

       

      We use many Flavor builds. So chang ing  EMDK's source.properties is much less work...

       

      At least the directory convention of the EMDK directories is wrong. Append "--debug" or "--info" to "gradlew" to see much more...
      This point will not affect the sync or my build but floods my console and logs.

       

      The directories should looks like:

       

      localhost:add-ons ah$ ls -l
      drwxr-xr-x   7 ah  staff  238 12 Jul 14:42 addon-symbol_emdk-symbol-16
      drwxr-xr-x   7 ah  staff  238 13 Jul 07:55 addon-symbol_emdk-symbol-19
      

       

       

      Best regards

      André