How do I build the open source Unity Ads extension?

with what aix compiler did you made the extension?
thanks

1 Like

I use appinventor-source

1 Like

You can compile it with Niotron ide too
ide.niotron.com

You just need to add a lib :slightly_smiling_face:

1 Like

But I tried with niotron Id and when I add the library and I click in compile, it says "fatal error" do you know why?


Thanks

what version of lib are you using?
and don't forget to change the @UsesLibraries annotation if you using lib latest version

1 Like

I am using the same than the extension

https://mvnrepository.com/artifact/com.unity3d.ads/unity-ads/3.6.0

1 Like

try to activate including androidx support on your niotron ide
Note: I recommend that you use appinventor-source

1 Like

I got it to do something!!!! but now I get this error :cry:

Started Compiling Project Unity_ads
Buildfile: /compiler/androidX/build.xml

javac:
[mkdir] Created dir: /compiler/androidX/build/WHUUG/classes
[javac] Compiling 1 source file to /compiler/androidX/build/WHUUG/classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
[javac] /compiler/androidX/src/WHUUG/com/meulencv/unityads/Unity_ads.java:34: error: class UnityAdsUtils is public, should be declared in a file named UnityAdsUtils.java
[javac] public class UnityAdsUtils extends AndroidNonvisibleComponent implements Component {
[javac] ^
[javac] Note: /compiler/androidX/src/WHUUG/com/meulencv/unityads/Unity_ads.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 1 error
[javac] 1 warning

haha :rofl: the problem is the project name is not UnityAdsUtils.
try to change the project name from Unity_ads to UnityAdsUtils (Pay attention to uppercase and lowercase)

oh...ok..:joy:
I make a new project with the same name, but it says other problem :cry:

javac:
[mkdir] Created dir: /compiler/androidX/build/IlxWw/classes
[javac] Compiling 1 source file to /compiler/androidX/build/IlxWw/classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
[javac] /compiler/androidX/src/IlxWw/com/meulencv/unityads/UnityAdsUtils.java:120: error: reached end of file while parsing
[javac] }
[javac] ^
[javac] 1 error
[javac] 1 warning

1 Like

Try to copy the source code carefully.
Use this method to copy all the code from notepad
CTRL + A = Select All Text
CTRL + C = Copy Text
CTRL + V = Paste Text

1 Like

Now it works, thank you very much, it was a big mistake of mine :cry:.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.