Ads doesn't work in unity 2017.1

Hi. Sorry for my bad english.
I few days ago installed new version Unity 2017.1.
Before i used 5.6.
I have a problem with integration ads in my project.
In old version unity, this code showed ads.
Now in new version unity, this code doesn’t work.
Error in console

Assets/UnityAdsExample.cs(15,45): error CS0246: The type or namespace name `ShowResult’ could not be found. Are you missing an assembly reference?

, and in code all method Advertisement showed error

“the name advertisement does not exist in the current context unity”

I installed from asset store . Unity ads.
Errors is gone. But code doesn’t work.

Advertisement.IsReady(“rewardedVideo”) send false

What’s wrong with my Unity?

Help me please!

using UnityEngine;
using UnityEngine.Advertisements;
    
                public class UnityAdsExample : MonoBehaviour
                {
                  public void ShowRewardedAd()
                  {
                    if (Advertisement.IsReady("rewardedVideo"))
                    {
                      var options = new ShowOptions { resultCallback = HandleShowResult };
                      Advertisement.Show("rewardedVideo", options);
                    }
                  }
    
                  private void HandleShowResult(ShowResult result)
                  {
                    switch (result)
                    {
                      case ShowResult.Finished:
                        Debug.Log("The ad was successfully shown.");
                        //
                        // YOUR CODE TO REWARD THE GAMER
                        // Give coins etc.
                        break;
                      case ShowResult.Skipped:
                        Debug.Log("The ad was skipped before reaching the end.");
                        break;
                      case ShowResult.Failed:
                        Debug.LogError("The ad failed to be shown.");
                        break;
                    }
                  }
                }

You have to update your code to work with you, I just did that and it works fine,
https://docs.unity3d.com/ScriptReference/Advertisements.Advertisement.Show.html

Switch Unity Ads OFF, save the project, close Unity. Run Unity again, open the project, switch the Unity Ads back ON.

I had the same problem. Fixed by following these steps:
1. going to the services window, then to ads, advanced, and unchecked "Enable built-in Ads extension.
2. Downloading the official ads plugin from the asset store.
3. When it finished importing, the “API update required” dialogue appeared. I pressed "I made a backup. Go ahead!
4. The error went away! I checked my code, it looked identical, but unity apparently thought something changed, or somehow re-connected something.

Notify: @Dabbash @Farol @Leking006

Maybe try switching to android in build settings.This worked for me

Install iOS or Android platform to Unity and switch your project to iOS or Android, Other platforms are currently not supported by UnityADS.

Also you can make your code more compatible with other platforms if you use the preprocessor macros to separate your sources.

#if UNITY_ADS 	
	#if UNITY_ANDROID || UNITY_IOS
	private void HandleShowResult(ShowResult result)
	{
		switch (result)
		{
		case ShowResult.Finished:
			Debug.Log ("The ad was successfully shown.");
			StorageManager.Lives++;
			if (StorageManager.Lives > Globals.maximumLives) {
				StorageManager.Lives = Globals.maximumLives;
			}
			Start ();
			break;
		case ShowResult.Skipped:
			Debug.Log("The ad was skipped before reaching the end.");
			break;
		case ShowResult.Failed:
			Debug.LogError("The ad failed to be shown.");
			break;
		}
	}
	#endif
#endif

Notify:
@Dabbash @Farol @Leking006

Gyorgy,
LumiNet / Level One Games
http://luminet.eu | http://levelonegames.com