I got about a hundred errors like this one all for values-v21.xml and a couple for values-v23.xml
C:\Users\Desktop\Zephyr\bin\android\release\bin\deps\google-play-services\build\intermediates\res\merged\release\values-v21\values-v21.xml:13: AAPT: Error retrieving parent for item: No resource found that matches the given name ‘android:TextAppearance.Material.Inverse’.
Is there something I need to install from the SDK Manager?
That worked
Now I’m getting a hundred of these:
major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
Do I upgrade the compiler and if so how, or should I downgrade Java??
It compiles a few things after that and then gives me:
What went wrong:
Execution failed for task ‘:app:transformClassesWithDexForDebug’.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
Ok it turns out that means you can’t have more than 65336 methods in your app unless you enable multidexing, whatever that is.
I switched back to using the build.gradle template recommended by Player03 and got it compiling with this error:
Called from ? line 1
Called from CommandLineTools.hx line 1426
Called from CommandLineTools.hx line 25
Called from CommandLineTools.hx line 126
Called from CommandLineTools.hx line 635
Called from lime/project/PlatformTarget.hx line 113
Called from lime/tools/platforms/AndroidPlatform.hx line 193
Called from C:\HaxeToolkit\haxe\std/neko/_std/sys/io/File.hx line 62
Called from C:\HaxeToolkit\haxe\std/neko/_std/sys/io/File.hx line 50
Uncaught exception - [file_open,C:\Users\Liam\Desktop\Zephyr\bin\android\release/bin/app/build/outputs/apk/app-debug.apk]
Yeah, that one’s pretty annoying. Multidex is tricky to set up, and I’ve heard it makes the build a lot longer. Personally, I use ProGuard to remove the unused methods. Start with these rules:
-keep public class com.your.package.** {
public *;
}
-keep class org.haxe.** {
public *;
}
-keep class com.google.android.gms.common.internal.** {
public *;
}
This error probably means you had an error earlier (search your output log) that caused the application to not be built, or it means we have a bad file path in the tools, but my first guess would be to look if there was an issue earlier in the log
Yeah it says
Note: C:\Users\Desktop\Zephyr\bin\android\release\bin\app\src\main\java\org\libsdl\app\SDLActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
But Player03 said in the other post that these are just warnings for the Lime devs to fix.
I’m in the UK so I have a long day of trying different things not knowing what I’m doing before I get a forum responses.
That’s prob why my forum posts are so erratic.
Are you referring to the the file_open error or the 65336 error?
How can i fix a bad file path in tools?
You said that removing the certificate tag fixed it. Do you get any errors about certificates when it is included? Is the path to the certificate file valid, etc?
That’s what I thought but if you read the last comment it turns out it just looked that way because it was running an old version of the .apk.
No just the file_open error
My .keystore file is in the top level of the project directory alongside project.xml.
I tried compiling with just these 2 and commenting out the rest to see what was going on
set name=“googlePlayGameServices” if=“android” />
haxelib name=“google-play-services” if=“android” />
And that led me back to the 65336 bug which Player03 advised using ProGuard to fix.
Which is why I’m back on this thread.
I usually get round that bug by including a template to a build.gradle file with this in it
apply plugin: ‘com.android.application’
But I'm not sure what that does, it certainly doesn't reduce the amount of methods in the app so I'm wondering if maybe it somehow hides the root problem?
:app:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: C:\Users\Desktop\Zephyr\bin\android\release\bin\app\src\main\java\org\libsdl\app\SDLActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Reading program directory [C:\Users\Desktop\Zephyr\bin\android\release\bin\app\build\intermediates\classes\release] (filtered)
Reading library jar [C:\Development\Android SDK\platforms\android-23\android.jar]
Reading library jar [C:\Development\Android SDK\platforms\android-23\optional\org.apache.http.legacy.jar]
Note: duplicate definition of library class [android.net.http.SslCertificate]
Note: duplicate definition of library class [android.net.http.SslError]
Note: duplicate definition of library class [android.net.http.SslCertificate$DName]
Note: duplicate definition of library class [org.apache.http.conn.scheme.SocketFactory]
Note: duplicate definition of library class [org.apache.http.conn.scheme.HostNameResolver]
Note: duplicate definition of library class [org.apache.http.conn.ConnectTimeoutException]
Note: duplicate definition of library class [org.apache.http.params.HttpParams]
Note: there were 8 duplicate class definitions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
Before you go ahead with ProGuard, you should check if you even need it anymore. I believe extension-googleplayservices imports the entire Play Services library, which is a lot of methods. My library imports only specific pieces (in your case, that’s the basic API + Google Play Game Services). Now that you switched, you may be back under the 65535 method limit.
To disable ProGuard, simply remove “minifyEnabled true.” If that works, you won’t have to worry about -keep at all.
If it fails, you’ll need a ProGuard configuration file. You can name your text file anything you like, but I’d suggest “zephyr.pro.” To add this file:
(Side note: I’d suggest adding resConfigs 'en' to that same section. The Google Play Services include translations for all kinds of languages, and this tag removes everything except English. If you keep those extra languages, Google Play will tell non-English-speakers that your app has been translated into their language.)
Still not sure why I’m going over the 65536 limit.
It’s a small application and I don’t have any other libraries installed, just your google-play-services, actuate, and a small lib of my own.
That did the trick.
Unfortunately it’s not working with extension-googleplaygames so I have no interface to work with it.
Should I just fork their extension and have a go at it myself?