admob-openfl
admob-openfl copied to clipboard
Java error - compile failure
When implementing your files now, I've been getting a compile error with this output: -compile:
[javac] C:\Users\Matzerath\Desktop\OrangeHaxe\bin\android\bin\src\org\haxe\lime\GameActivity.java:172: cannot find symbol
[javac] symbol : variable packageName
[javac] location: class org.haxe.extension.Extension
[javac] Extension.packageName = getApplicationContext ().getPackageName ();
[javac] ^
[javac] C:\Users\Matzerath\Desktop\OrangeHaxe\bin\android\bin\src\org\haxe\lime\GameActivity.java:587: cannot find symbol
[javac] symbol : method onLowMemory()
[javac] location: class org.haxe.extension.Extension
[javac] extension.onLowMemory ();
[javac] ^
[javac] C:\Users\Matzerath\Desktop\OrangeHaxe\bin\android\bin\src\org\haxe\lime\GameActivity.java:598: cannot find symbol
[javac] symbol : method onNewIntent(android.content.Intent)
[javac] location: class org.haxe.extension.Extension
[javac] extension.onNewIntent (intent);
[javac] ^
[javac] C:\Users\Matzerath\Desktop\OrangeHaxe\bin\android\bin\src\org\haxe\lime\GameActivity.java:708: cannot find symbol
[javac] symbol : method onTrimMemory(int)
[javac] location: class org.haxe.extension.Extension
[javac] extension.onTrimMemory (level);
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 4 errors
BUILD FAILED C:\Development\sdk\tools\ant\build.xml:720: The following error occurred while executing this line: C:\Development\sdk\tools\ant\build.xml:734: Compile failed; see the compiler error output for details.
I've tried various things to fix this (updated haxelib, changed SDK build, other madness) but get the same errors every time. Any thoughts? I did have this working previously, so maybe an openFL/Lime update is causing problems -- or I just screwed something up!
Also, the project will compile without the admob code -- in fact, if I remove just the GameActivity.java template path change, it will compile (though the ad code will fail, of course).
What is your version of OpenFL/lime and Android SDK?
OpenFL: 1.4.0 Lime: 0.9.7 SDK: 22.6.4 with build tools up-to-date.
Anyhoo - what I ended up doing was compiling without the ad code, then taking the generated GameActivity.java and manually inserting your admob code (thanks for marking those off!); I put that in the android-template folder and it worked! Basically it appears they updated GameActivity and the errors I got were functions that have been removed. That is my inexpert opinion!