# Convert Java to Dex

**URL:** <https://discussions.unity.com/t/convert-java-to-dex/746066>\
**Category:** Unity Ads\
**Tags:** Scripting\
**Created:** [June 5, 2019, 7:00pm UTC](https://discussions.unity.com/t/convert-java-to-dex/746066 "2019-06-05T19:00:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![isc20703](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@isc20703](https://discussions.unity.com/u/isc20703)\
**Post date:** [June 5, 2019, 7:00pm UTC](https://discussions.unity.com/t/convert-java-to-dex/746066/1 "2019-06-05T19:00:26Z")

</div>

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();  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![lordofduct](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/lordofduct/32/890751_2.png) [@lordofduct](https://discussions.unity.com/u/lordofduct)\
**Post date:** [June 5, 2019, 8:19pm UTC](https://discussions.unity.com/t/convert-java-to-dex/746066/2 "2019-06-05T20:19:13Z")

</div>

USE CODE TAGS:

> [@Using code tags properly](https://discussions.unity.com/t/481379):
>
> If you see someone who needs to know about code tags, please link them to this post: Please use code tags when posting code. You can "tag" your code by typing [984347--130826--Screenshot 2015-03-16 10.33.58.png] around your code. There is no overt "Code" tag button that automatically tags a selection as code. That being said, however, we can Insert code directly into the post using the "Insert Code" button: [image] This will bring up an "Insert" window were we can paste our code and c…
