AGK target.

Arohas

New member
Joined
Feb 14, 2021
Messages
16
I've definitely made some progress. Now I am getting the following error:

* What went wrong:
Could not determine the dependencies of task ':AGK2Template:compileReleaseJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':AGK2Template:releaseCompileClasspath'.
> Could not resolve project :FacebookSDK.
Required by:
project :AGK2Template
> No matching configuration of project :FacebookSDK was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' but:
- None of the consumable configurations have attributes.

FacebookSDK?
I almost hate google and android.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,812
Did you use the latest buildtarget script that I procide to you? That Facebook error you get with teh old version. TGCs template is broken, the new script fixes that when build the CX target. You need to delete the build folder of your CX project when you use the new target.
 

Arohas

New member
Joined
Feb 14, 2021
Messages
16
I managed to get rid of the facebook SDK error.
And now I have the following:
> Task :AGK2Template:compileReleaseJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\Environment\Compilers\Cerberus\examples\agk\ship\ship.buildv2020-12-05\appgamekit_android\AGKTemplate\apps\template_android_google\AGK2Template\src\main\java\com\thegamecreators\agk_player\AGKHelper.java uses unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.
> Task :AGK2Template:compileReleaseSources
> Task :AGK2Template:lintVitalRelease FAILED

D:\Environment\Compilers\Cerberus\examples\agk\ship\ship.buildv2020-12-05\appgamekit_android\AGKTemplate\apps\template_android_google\AGK2Template\build.gradle: Error: commons-logging defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]

D:\Environment\Compilers\Cerberus\examples\agk\ship\ship.buildv2020-12-05\appgamekit_android\AGKTemplate\apps\template_android_google\AGK2Template\build.gradle: Error: httpclient defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]

Explanation for issues of type "DuplicatePlatformClasses":
There are a number of libraries that duplicate not just functionality of
the Android platform but using the exact same class names as the ones
provided in Android -- for example the apache http classes. This can lead
to unexpected crashes.

To solve this, you need to either find a newer version of the library which
no longer has this problem, or to repackage the library (and all of its
dependencies) using something like the jarjar tool, or finally, rewriting
the code to use different APIs (for example, for http code, consider using
HttpUrlConnection or a library like okhttp).

2 errors, 0 warnings

FAILURE: Build failed with an exception.
24 actionable tasks: 24 executed

* What went wrong:
Execution failed for task ':AGK2Template:lintVitalRelease'.

> Lint found fatal errors while assembling a release target.

To proceed, either fix the issues identified by lint, or modify your build script as follows:

...
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
...
I have to admit it is exhausting.
I'll go and smash some phone...
 

Arohas

New member
Joined
Feb 14, 2021
Messages
16
Did you use the latest buildtarget script that I procide to you? That Facebook error you get with teh old version. TGCs template is broken, the new script fixes that when build the CX target. You need to delete the build folder of your CX project when you use the new target.
I build with a new script.
Just removed facebook from gradle config manually.
...
Oops, I was wrong! the script is old ...
Now I will try again...
...
I figured out how this happened: the file was opened in "ted", he overwritten it back ...
:confused:
...
Alas, it didn't help. I will pause.
 
Last edited:

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,812
Again, the last BuildTarget.cxs script fixes also this problem. But you need to delete any build folder from your example folder before you build+run again. Or the updated gradle scripts are not copied over from the target folder.

Like I said, Android can be a pain in the rear end. And the bad part is that it is constantly changing.

Soon app bundles have to be created instead of app files.
 

Arohas

New member
Joined
Feb 14, 2021
Messages
16
So! All the same, I did it!
I used Cerberus generated files and android studio project from AGK tier2 templates.
I build it using the scripts included in the kit, and assembled apk in the studio.
Of course, this is not the most convenient way, but it suits me, besides, I gained faith!!! ;)
Thanks for your help and the wonderful Cerberus!

Snapshot_20210217.png
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,812
I am glad you got it working. The reason why it is so complicated with CX and in particular is that I am not allowed to ship the AGK libs and templates with CX. So a way to extract these, build a target, module and rudimentary docs was needed. That is why you got to deal with the BuildTarget script.
When targets get updated, especially Android, you need to delete the build folder of your project.
Android is a huge pain. But we have to deal with it and it's ways to build projects.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,812
Btw, if you want to have a different cor theme of TED, you can change it inside its options.
 
Top Bottom