Search Unity

Convert Java to Dex

Discussion in 'Scripting' started by isc20703, Jun 5, 2019.

  1. isc20703

    isc20703

    Joined:
    Apr 3, 2019
    Posts:
    9
    I added the following code to my game and now it is unable to convert thwe game to APK because of unable to convert java to DEX. here is the new code:

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.Advertisements;

    public class ads : MonoBehaviour
    {
    private string store_id = "3135934";
    private string video_ad = "video";
    private string banner_ad = "banner";

    void Start()
    {
    Advertisement.Initialize(store_id,false);
    request_banner();
    }

    public void request_ad()
    {
    if (Advertisement.IsReady(video_ad))
    {
    Advertisement.Show();
    }
    }

    void request_banner()
    {
    if (Advertisement.IsReady(banner_ad))
    {
    Advertisement.Show();
    }
    }
    }
     
  2. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,532