Project has more than 65536 methods

8

Adding the Analytics Package to the project resulted in an error in the project. As explained in this blog , the error occurs when the project has more than 65536 methods ( only the added Google Play Services package has about 30,000 methods). The same link that explains the error brings the solution, enable the Multi-dex .

When activating Multi-dex, another error occurred, the option for multi-dex fails when the Android SDK contains a space, as the Android SDK folder is inside "C: \ Program Files (x86) \ Android \ android-sdk "error occurs because of" Program Files (x86) "that has spaces between words.

Does anyone have a solution?

    
asked by anonymous 28.04.2017 / 20:08

1 answer

8

I've already had this problem and to resolve it I've copied the "android-sdk" file into the C directory (C: \ android-sdk) solving the URL space problem.

After copying you need to update the paths to the SDK:

In Visual Studio the file location path:

 Tools > Options > Xamarin > Android Settings > Android SDK Location

No Xamarin Studio:

 Tools > Options > SDK Locations > Android > Android SDK

After this change happens another error:

 "Unsupported class version number [52.0] (maximum 51.0, Java 1.7)".

To resolve this, you had to update the proguard file for android-sdk. After downloading the latest version of the file, simply rename the existing "proguard" file to any name, unzip the downloaded file into "android-sdk" and change its name to "proguard".

    
28.04.2017 / 20:17