Jibble

Author Topic: Let's build for Android!  (Read 21576 times)

Re: Let's build for Android!
« Reply #40 on: 23 Aug 2021, 08:54 »
Cool, but the size of my game is 1.47 GB. Does that mean I can't build for Google Play? I don't quite understand. Is there a limited size for .aab? earlier you could upload 2 obb files so 4 GB and what about the .aab format now?
Truly, truly, i say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

eri0o

Re: Let's build for Android!
« Reply #41 on: 23 Aug 2021, 12:18 »
Unfortunately the absolute maximum has lowered now

- 150 MB for your Android App Bundle without the asset packs (once you add them in their directories, the AAB will include them)
- 1GB for all install-time Asset combined (which works with regular Android API)
- 512 MB for all on-demand assets (requires Play Store specific API)
- 512 MB for all fast-follow assets (requires Play Store specific API)

You can see info here or discussion here. I have not worked on on-demand and fast-follow assets - anyone else is invited to, I don't know how to work with those, it would be important to check if they break app compatibility with other stores, say if you don't use those but add a dependency to the Play Core Library and then push the app to Amazon (or other non-Google store), what will happen?

Is your game using compression for the graphics in AGS? AGS compression is very minimal but better than no compression. Do you have an estimate of what your game size breakdown is (graphics, music, voice...)? Here's a forum topic that talks about this.

You can also turn compression on in the asset pack itself and see what it does for you, but it may have a significant performance impact - or may not, you would need to try and test it for your case.

See also Managing Audio and Graphics Footprint in AGS-Manual.
« Last Edit: 23 Aug 2021, 14:35 by eri0o »

Re: Let's build for Android!
« Reply #42 on: 23 Aug 2021, 14:40 »
Quote
Is your game using compression for the graphics in AGS? AGS compression is very minimal but better than no compression.

No, it's false. I thought it has disadvantages, so I didn't activate it. I can try it and see thereafter the game size.

Quote
The total download size limit for all asset packs in an Android App Bundle is 2 GB.

- 150 MB for your Android App Bundle without the asset packs (once you add them in their directories, the AAB will include them)
- 1GB for all install-time Asset combined (which works with regular Android API)
- 512 MB for all on-demand assets (requires Play Store specific API)
- 512 MB for all fast-follow assets (requires Play Store specific API)

That means my game is also possible. I will read more about it and about fast-follow and on-demand, I cann't understand a word now.

Thank u.
Truly, truly, i say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: Let's build for Android!
« Reply #43 on: 23 Aug 2021, 17:36 »
IMHO it's also a good option to look for methods to optimize your game. Find out how much everything takes - sprites, audio, etc. There's always a way to reduce the space each of these types of resources demand.

I think in any case it's important to keep in mind that what works on PC will not necessarily work on mobile devices as-is, and may require to be adjusted.
« Last Edit: 23 Aug 2021, 17:48 by Crimson Wizard »

Re: Let's build for Android!
« Reply #44 on: 25 Aug 2021, 20:51 »
Okay, I will.
Truly, truly, i say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

eri0o

Re: Let's build for Android!
« Reply #45 on: 25 Aug 2021, 23:26 »
Amir, but did it ran in your device? Did it worked for you at least?

Re: Let's build for Android!
« Reply #46 on: 26 Aug 2021, 16:30 »
Amir, but did it ran in your device? Did it worked for you at least?

Not yet. That scared me off:
Quote
You will need the following to build this project:

Android Studio
AGS engine native libraries.
A compiled AGS game (NOTE: Game must be < 1 GB total).

And I will get annoyed if it works and then I can't upload it on Google Play because of the size  ;-D but I will try it anyway.

Should I update the package name and do all updates befor I build in Android Studio, right?

And which compiled game files in the assets folder do u mean? acsetup.cfg gamename.ags somelanguage.tra? these files?
 
« Last Edit: 26 Aug 2021, 16:33 by Amir »
Truly, truly, i say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

eri0o

Re: Let's build for Android!
« Reply #47 on: 26 Aug 2021, 16:45 »
Should I update the package name and do all updates befor I build in Android Studio, right?

And which compiled game files in the assets folder do u mean? acsetup.cfg gamename.ags somelanguage.tra? these files?

First do this with all your files from Compiled/Data dir:

The real short version of the guide is, place your compiled game files in mygame/app/src/main/assets and click build in Android Studio and see if things work. Then read the guide for details and ask here in case of problems.  :-D

If you have your phone connected, after everything is done, it will even install and boot it there!

Also, please turn on sprite compression in the Editor and check the resulting size of the spritecache.

Then you do all the other things. If you are using Android Studio Artic Fox or newer there's even an easier way of doing the other steps but for now all the steps in the README should work fine - basically, on the newest Android Studio, you can have Java package files and android app IDs that doesn't match, so in theory, once everyone has updated their tools, all those steps can be a simple one line in the gradle file.
« Last Edit: 26 Aug 2021, 16:48 by eri0o »

Re: Let's build for Android!
« Reply #48 on: 26 Aug 2021, 21:16 »
I can't believe my eyes, after sprite compression it's 321 MB  (laugh) . I copied everything in the right place. I opened the project in Android Studio, the project must be mygame in Android folder. But i'm getting errors
Spoiler: ShowHide

Download https://services.gradle.org/distributions/gradle-6.5-bin.zip finished, took 21 s 516 ms (102,36 MB)
Starting Gradle Daemon...
Gradle Daemon started in 10 s 594 ms

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\F�r Android Portierung\ags-master\Android\mygame\app\build.gradle' line: 1

* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.internal.application']
   > Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details. This warning can be disabled by adding the line 'android.overridePathCheck=true' to gradle.properties file in the project directory.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3m 2s



I just wanted to open it to update package name  :-\ I don't know why it says BUILD FAILED, I didn't want to build. Do u know how to fix this? should I move the project to a different directory, to C:/ maybe? and should I add the line 'android.overridePathCheck=true' to gradle.properties file in the project directory?

It's Android Studio 4.2.2
Truly, truly, i say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

eri0o

Re: Let's build for Android!
« Reply #49 on: 26 Aug 2021, 22:15 »
In your error message there's a character my browser can't render ("F�r") in your path, my guess is it's complaining about that. Make sure that the path to the android studio project has only "normal" characters (you know, things that are on the first half of an ASCII table, [a-zA-Z0-9_] , things beyond this will not work. Also to be safe, avoid space character in these directories!

Also if you can, please use Artic Fox (latest stable version of Android Studio) instead, there's a ton of bugs that have been fixed, specially for people on Windows. The version number now changed and it's something like 2020.3.X .

CW made a release today of AGS 3.6.0 and it has Android libs pre-built that you can use to avoid building native parts.

Re: Let's build for Android!
« Reply #50 on: 27 Aug 2021, 00:43 »
Oh I thought I have the latest version. Ok, I will download this 2020.3.1.

Quote
CW made a release today of AGS 3.6.0 and it has Android libs pre-built that you can use to avoid building native parts.

I'm using AGS 3.4.3 so I'm using Android libs of this version or do I have to use the libs of AGS 3.6.0?
Truly, truly, i say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Re: Let's build for Android!
« Reply #51 on: 27 Aug 2021, 13:29 »
I got the error Android\ndk\21.1.6352462 did not have a source.properties file code
in build.gradle I added
Code: Adventure Game Studio
  1. android
  2.  {
  3.    ndkVersion '21.1.6352462'
  4.  }
  5.  

Now i'm getting another error:
Spoiler: ShowHide

Build file 'D:\For Android Portierung\ags-master\Android\mygame\build.gradle' line: 3

A problem occurred evaluating root project 'My Game'.
> Could not find method android() for arguments [build_6shez079iib0161lxajj9t08b$_run_closure1@1ef0bb64] on root project 'My Game' of type org.gradle.api.Project.

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'My Game'.
   at org.gradle.groovy.scripts.internal.Defa ultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
   at org.gradle.configuration.DefaultScriptP luginFactory$ScriptPluginImpl.lambda$apply$0(DefaultScriptPluginFactory.java:133)
   at org.gradle.configuration.ProjectScriptT arget.addConfiguration(ProjectScriptTarget.java:77)
   at org.gradle.configuration.DefaultScriptP luginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:136)
   at org.gradle.configuration.BuildOperation ScriptPlugin$1.run(BuildOperationScriptPlugin.java:65)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
   at org.gradle.internal.operations.DefaultB uildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
   at org.gradle.internal.operations.DefaultB uildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
   at org.gradle.internal.operations.DefaultB uildOperationRunner.run(DefaultBuildOperationRunner.java:56)
   at org.gradle.internal.operations.DefaultB uildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
   at org.gradle.internal.operations.Unmanage dBuildOperationWrapper.runWithUnmanaged Support(UnmanagedBuildOperationWrapper.java:45)
   at org.gradle.internal.operations.DefaultB uildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
   at org.gradle.configuration.BuildOperation ScriptPlugin.lambda$apply$0(BuildOperationScriptPlugin.java:62)
   at org.gradle.configuration.internal.Defau ltUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:43)
   at org.gradle.configuration.BuildOperation ScriptPlugin.apply(BuildOperationScriptPlugin.java:62)
   at org.gradle.api.internal.project.Default ProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:250)
   at org.gradle.api.internal.project.Default ProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:277)
   at org.gradle.api.internal.project.Default ProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:249)
   at org.gradle.configuration.project.BuildS criptProcessor.execute(BuildScriptProcessor.java:42)
   at org.gradle.configuration.project.BuildS criptProcessor.execute(BuildScriptProcessor.java:26)
   at org.gradle.configuration.project.Config ureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:35)
   at org.gradle.configuration.project.Lifecy cleProjectEvaluator$EvaluateProject.lambda$run$0(LifecycleProjectEvaluator.java:100)
   at org.gradle.api.internal.project.Default ProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:250)
   at org.gradle.api.internal.project.Default ProjectStateRegistry$ProjectStateImpl.lambda$withProjectLock$3(DefaultProjectStateRegistry.java:310)
   at org.gradle.internal.work.DefaultWorkerL easeService.withLocks(DefaultWorkerLeaseService.java:213)
   at org.gradle.api.internal.project.Default ProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:310)
   at org.gradle.api.internal.project.Default ProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:291)
   at org.gradle.api.internal.project.Default ProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:249)
   at org.gradle.configuration.project.Lifecy cleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:91)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
   at org.gradle.internal.operations.DefaultB uildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
   at org.gradle.internal.operations.DefaultB uildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
   at org.gradle.internal.operations.DefaultB uildOperationRunner.run(DefaultBuildOperationRunner.java:56)
   at org.gradle.internal.operations.DefaultB uildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
   at org.gradle.internal.operations.Unmanage dBuildOperationWrapper.runWithUnmanaged Support(UnmanagedBuildOperationWrapper.java:45)
   at org.gradle.internal.operations.DefaultB uildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
   at org.gradle.configuration.project.Lifecy cleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:63)
   at org.gradle.api.internal.project.Default Project.evaluate(DefaultProject.java:721)
   at org.gradle.api.internal.project.Default Project.evaluate(DefaultProject.java:151)
   at org.gradle.execution.TaskPathProjectEva luator.configure(TaskPathProjectEvaluator.java:41)
   at org.gradle.execution.TaskPathProjectEva luator.configureHierarchy(TaskPathProjectEvaluator.java:67)
   at org.gradle.configuration.DefaultProject sPreparer.prepareProjects(DefaultProjectsPreparer.java:46)
   at org.gradle.configuration.BuildTreePrepa ringProjectsPreparer.prepareProjects(BuildTreePreparingProjectsPreparer.java:56)
   at org.gradle.configuration.BuildOperation FiringProjectsPreparer$ConfigureBuild.run(BuildOperationFiringProjectsPreparer.ja va:52)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
   at org.gradle.internal.operations.DefaultB uildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
   at org.gradle.internal.operations.DefaultB uildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
   at org.gradle.internal.operations.DefaultB uildOperationRunner.run(DefaultBuildOperationRunner.java:56)
   at org.gradle.internal.operations.DefaultB uildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
   at org.gradle.internal.operations.Unmanage dBuildOperationWrapper.runWithUnmanaged Support(UnmanagedBuildOperationWrapper.java:45)
   at org.gradle.internal.operations.DefaultB uildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
   at org.gradle.configuration.BuildOperation FiringProjectsPreparer.prepareProjects(BuildOperationFiringProjectsPreparer.ja va:40)
   at org.gradle.initialization.DefaultGradle Launcher.prepareProjects(DefaultGradleLauncher.java:226)
   at org.gradle.initialization.DefaultGradle Launcher.doClassicBuildStages(DefaultGradleLauncher.java:163)
   at org.gradle.initialization.DefaultGradle Launcher.doBuildStages(DefaultGradleLauncher.java:148)
   at org.gradle.initialization.DefaultGradle Launcher.executeTasks(DefaultGradleLauncher.java:124)
   at org.gradle.internal.invocation.GradleBu ildController$1.create(GradleBuildController.java:72)
   at org.gradle.internal.invocation.GradleBu ildController$1.create(GradleBuildController.java:67)
   at org.gradle.internal.work.DefaultWorkerL easeService.withLocks(DefaultWorkerLeaseService.java:213)
   at org.gradle.internal.invocation.GradleBu ildController.doBuild(GradleBuildController.java:67)
   at org.gradle.internal.invocation.GradleBu ildController.run(GradleBuildController.java:56)
   at org.gradle.tooling.internal.provider.ru nner.BuildModelActionRunner.run(BuildModelActionRunner.java:56)
   at org.gradle.launcher.exec.ChainingBuildA ctionRunner.run(ChainingBuildActionRunner.java:35)
   at org.gradle.launcher.exec.ChainingBuildA ctionRunner.run(ChainingBuildActionRunner.java:35)
   at org.gradle.launcher.exec.BuildOutcomeRe portingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner. java:63)
   at org.gradle.tooling.internal.provider.Va lidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
   at org.gradle.tooling.internal.provider.Fi leSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.jav a:77)
   at org.gradle.launcher.exec.BuildCompletio nNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunn er.java:41)
   at org.gradle.launcher.exec.RunAsBuildOper ationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.ja va:49)
   at org.gradle.launcher.exec.RunAsBuildOper ationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.ja va:44)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
   at org.gradle.internal.operations.DefaultB uildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
   at org.gradle.internal.operations.DefaultB uildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
   at org.gradle.internal.operations.DefaultB uildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
   at org.gradle.internal.operations.DefaultB uildOperationRunner.call(DefaultBuildOperationRunner.java:62)
   at org.gradle.internal.operations.DefaultB uildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
   at org.gradle.internal.operations.Unmanage dBuildOperationWrapper.callWithUnmanage dSupport(UnmanagedBuildOperationWrapper.java:54)
   at org.gradle.internal.operations.DefaultB uildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
   at org.gradle.launcher.exec.RunAsBuildOper ationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.ja va:44)
   at org.gradle.launcher.exec.InProcessBuild ActionExecuter.lambda$execute$0(InProcessBuildActionExecuter.java:54)
   at org.gradle.composite.internal.DefaultRo otBuildState.run(DefaultRootBuildState.java:86)
   at org.gradle.launcher.exec.InProcessBuild ActionExecuter.execute(InProcessBuildActionExecuter.java:53)
   at org.gradle.launcher.exec.InProcessBuild ActionExecuter.execute(InProcessBuildActionExecuter.java:29)
   at org.gradle.launcher.exec.BuildTreeScope LifecycleBuildActionExecuter.lambda$execute$0(BuildTreeScopeLifecycleBuildActionExecu ter.java:33)
   at org.gradle.internal.buildtree.BuildTree State.run(BuildTreeState.java:49)
   at org.gradle.launcher.exec.BuildTreeScope LifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActionExecu ter.java:32)
   at org.gradle.launcher.exec.BuildTreeScope LifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActionExecu ter.java:27)
   at org.gradle.tooling.internal.provider.Co ntinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:104)
   at org.gradle.tooling.internal.provider.Co ntinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:55)
   at org.gradle.tooling.internal.provider.Su bscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:64)
   at org.gradle.tooling.internal.provider.Su bscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:37)
   at org.gradle.tooling.internal.provider.Se ssionScopeLifecycleBuildActionExecuter. lambda$execute$0(SessionScopeLifecycleBuildActionExecute r.java:54)
   at org.gradle.internal.session.BuildSessio nState.run(BuildSessionState.java:67)
   at org.gradle.tooling.internal.provider.Se ssionScopeLifecycleBuildActionExecuter. execute(SessionScopeLifecycleBuildActionExecute r.java:50)
   at org.gradle.tooling.internal.provider.Se ssionScopeLifecycleBuildActionExecuter. execute(SessionScopeLifecycleBuildActionExecute r.java:36)
   at org.gradle.tooling.internal.provider.Gr adleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
   at org.gradle.tooling.internal.provider.Gr adleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
   at org.gradle.tooling.internal.provider.St artParamsValidatingActionExecuter.execu te(StartParamsValidatingActionExecuter.jav a:59)
   at org.gradle.tooling.internal.provider.St artParamsValidatingActionExecuter.execu te(StartParamsValidatingActionExecuter.jav a:31)
   at org.gradle.tooling.internal.provider.Se ssionFailureReportingActionExecuter.exe cute(SessionFailureReportingActionExecuter.j ava:55)
   at org.gradle.tooling.internal.provider.Se ssionFailureReportingActionExecuter.exe cute(SessionFailureReportingActionExecuter.j ava:41)
   at org.gradle.tooling.internal.provider.Se tupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
   at org.gradle.tooling.internal.provider.Se tupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
   at org.gradle.launcher.daemon.server.exec. ExecuteBuild.doBuild(ExecuteBuild.java:65)
   at org.gradle.launcher.daemon.server.exec. BuildCommandOnly.execute(BuildCommandOnly.java:37)
   at org.gradle.launcher.daemon.server.api.D aemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   at org.gradle.launcher.daemon.server.exec. WatchForDisconnection.execute(WatchForDisconnection.java:39)
   at org.gradle.launcher.daemon.server.api.D aemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   at org.gradle.launcher.daemon.server.exec. ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
   at org.gradle.launcher.daemon.server.api.D aemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   at org.gradle.launcher.daemon.server.exec. RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
   at org.gradle.launcher.daemon.server.api.D aemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   at org.gradle.launcher.daemon.server.exec. ForwardClientInput$2.create(ForwardClientInput.java:78)
   at org.gradle.launcher.daemon.server.exec. ForwardClientInput$2.create(ForwardClientInput.java:75)
   at org.gradle.util.Swapper.swap(Swapper.java:38)
   at org.gradle.launcher.daemon.server.exec. ForwardClientInput.execute(ForwardClientInput.java:75)
   at org.gradle.launcher.daemon.server.api.D aemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   at org.gradle.launcher.daemon.server.exec. LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
   at org.gradle.launcher.daemon.server.api.D aemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   at org.gradle.launcher.daemon.server.exec. LogToClient.doBuild(LogToClient.java:63)
   at org.gradle.launcher.daemon.server.exec. BuildCommandOnly.execute(BuildCommandOnly.java:37)
   at org.gradle.launcher.daemon.server.api.D aemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   at org.gradle.launcher.daemon.server.exec. EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
   at org.gradle.launcher.daemon.server.exec. BuildCommandOnly.execute(BuildCommandOnly.java:37)
   at org.gradle.launcher.daemon.server.api.D aemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   at org.gradle.launcher.daemon.server.exec. StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
   at org.gradle.launcher.daemon.server.Daemo nStateCoordinator$1.run(DaemonStateCoordinator.java:297)
   at org.gradle.internal.concurrent.Executor Policy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
   at org.gradle.internal.concurrent.ManagedE xecutorImpl$1.run(ManagedExecutorImpl.java:48)
   at org.gradle.internal.concurrent.ThreadFa ctoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: org.gradle.internal.metaobject.Abstract DynamicObject$CustomMessageMissingMethodException: Could not find method android() for arguments [build_6shez079iib0161lxajj9t08b$_run_closure1@1ef0bb64] on root project 'My Game' of type org.gradle.api.Project.
   at org.gradle.internal.metaobject.Abstract DynamicObject$CustomMissingMethodExecutionFailed.<init>(AbstractDynamicObject.java:190)
   at org.gradle.internal.metaobject.Abstract DynamicObject.methodMissingException(AbstractDynamicObject.java:184)
   at org.gradle.groovy.scripts.BasicScript$ScriptDynamicObject.methodMissingException(BasicScript.java:162)
   at org.gradle.internal.metaobject.Abstract DynamicObject.invokeMethod(AbstractDynamicObject.java:167)
   at org.gradle.groovy.scripts.BasicScript.i nvokeMethod(BasicScript.java:84)
   at build_6shez079iib0161lxajj9t08b.run(D:\For Android Portierung\ags-master\Android\mygame\build.gradle:3)
   at org.gradle.groovy.scripts.internal.Defa ultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)



I read it might be because of the Gradle version. I took a look in my setting, Android Gradle Plugin Version 4.1.2 and Gradle Version nothing. This version is very old. Should I change Android Gradle Plugin Version and Gradle Version?
Truly, truly, i say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Re: Let's build for Android!
« Reply #52 on: 12 Sep 2021, 16:59 »
I tried again today and it worked. I mean I was able to create com.mystudioname.gamename I had to delete android {ndkVersion '21.1.6352462'} that what I added last time. I think it worked because of Windows updates that were running recently, I don't know. But when I'm trying to build APKs I'm getting 3 errors from CMake. As a precaution I downloaded the latest version of CMake cmake-3.21.2 and added its path in Windows, but that didn't help.

The errors:
Spoiler: ShowHide

[CXX1405] error when building with cmake using D:\For Android Portierung\ags-master\CMakeLists.txt: Build command failed.
  Error while executing process C:\CMake\cmake-3.21.2-windows-x86_64\bin\cmake.exe with arguments {-HD:\For Android Portierung\ags-master -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=19 -DANDROID_PLATFORM=android-19 -DANDROID_ABI=armeabi-v7a -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DANDROID_NDK=C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147 -DCMAKE_ANDROID_NDK=C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147 -DCMAKE_TOOLCHAIN_FILE=C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147\build\cmake\android.toolchain.cmake -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\For Android Portierung\ags-master\Android\library\runtime\build\intermediates\cxx\Debug\1r4n6yv3\obj\armeabi-v7a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=D:\For Android Portierung\ags-master\Android\library\runtime\build\intermediates\cxx\Debug\1r4n6yv3\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -BD:\For Android Portierung\ags-master\Android\library\runtime\.cxx\Debug\1r4n6yv3\armeabi-v7a -GNinja -DANDROID_APP_PLATFORM=android-16 -DANDROID_STL=c++_static}
  -- Configuring incomplete, errors occurred!
  See also "D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/CMakeFiles/CMakeOutput.log".
 
  CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.

Spoiler: ShowHide

> Task :runtime:configureCMakeDebug
C/C++: debug|armeabi-v7a :CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.

> Task :runtime:configureCMakeDebug FAILED
Execution failed for task ':runtime:configureCMakeDebug'.
> [CXX1405] error when building with cmake using D:\For Android Portierung\ags-master\CMakeLists.txt: Build command failed.
  Error while executing process C:\CMake\cmake-3.21.2-windows-x86_64\bin\cmake.exe with arguments {-HD:\For Android Portierung\ags-master -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=19 -DANDROID_PLATFORM=android-19 -DANDROID_ABI=armeabi-v7a -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DANDROID_NDK=C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147 -DCMAKE_ANDROID_NDK=C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147 -DCMAKE_TOOLCHAIN_FILE=C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147\build\cmake\android.toolchain.cmake -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\For Android Portierung\ags-master\Android\library\runtime\build\intermediates\cxx\Debug\1r4n6yv3\obj\armeabi-v7a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=D:\For Android Portierung\ags-master\Android\library\runtime\build\intermediates\cxx\Debug\1r4n6yv3\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -BD:\For Android Portierung\ags-master\Android\library\runtime\.cxx\Debug\1r4n6yv3\armeabi-v7a -GNinja -DANDROID_APP_PLATFORM=android-16 -DANDROID_STL=c++_static}
  -- Configuring incomplete, errors occurred!
  See also "D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/CMakeFiles/CMakeOutput.log".

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Spoiler: ShowHide

[CXX1405] error when building with cmake using D:\For Android Portierung\ags-master\CMakeLists.txt: Build command failed.
Error while executing process C:\CMake\cmake-3.21.2-windows-x86_64\bin\cmake.exe with arguments {-HD:\For Android Portierung\ags-master -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=19 -DANDROID_PLATFORM=android-19 -DANDROID_ABI=armeabi-v7a -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DANDROID_NDK=C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147 -DCMAKE_ANDROID_NDK=C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147 -DCMAKE_TOOLCHAIN_FILE=C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147\build\cmake\android.toolchain.cmake -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\For Android Portierung\ags-master\Android\library\runtime\build\intermediates\cxx\Debug\1r4n6yv3\obj\armeabi-v7a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=D:\For Android Portierung\ags-master\Android\library\runtime\build\intermediates\cxx\Debug\1r4n6yv3\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -BD:\For Android Portierung\ags-master\Android\library\runtime\.cxx\Debug\1r4n6yv3\armeabi-v7a -GNinja -DANDROID_APP_PLATFORM=android-16 -DANDROID_STL=c++_static}
-- Configuring incomplete, errors occurred!
See also "D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/CMakeFiles/CMakeOutput.log".

CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.


I think something is wrong with the CMake files in the ags-master from eri0o. Does anyone know what's wrong? And am I the only one who gets these errors? could anyone create APK file? or a bundle What ever.
Truly, truly, i say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: Let's build for Android!
« Reply #53 on: 12 Sep 2021, 17:24 »
Do you have the Ninja tool installed? All these errors seem like refering to it.

The Android readme sais:
Quote
Ninja (at least 1.10.0 should be good), also needs to be added to PATH

I think you can get it here: https://ninja-build.org/

Re: Let's build for Android!
« Reply #54 on: 12 Sep 2021, 18:00 »
Do you have the Ninja tool installed? All these errors seem like refering to it.

The Android readme sais:
Quote
Ninja (at least 1.10.0 should be good), also needs to be added to PATH

I think you can get it here: https://ninja-build.org/

Oh I didn‘t see that  :-X ok I will download it and add the location to path and see if it works, thank u.
Truly, truly, i say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Re: Let's build for Android!
« Reply #55 on: 13 Sep 2021, 16:11 »
I added ninja.exe location to my path and added CMake as well to path then changed the version number of CMake in build.gradle. I'm using 3.21.2. Now it finds the ninja but something is still wrong, when I open the project I get one error:
Spoiler: ShowHide

        C/C++ Configuration Problem
   TheSecretsofJesus.runtime | debug | x86
   Compiler exited with error code 1: C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe -xc --target=i686-none-linux-android19 --gcc-toolchain=C:/Users/AmigoUfo/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/AmigoUfo/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DGL_GLEXT_PROTOTYPES -DUSING_GENERATED_CONFIG_H -D_DEBUG -D_FILE_OFFSET_BITS=64 -ID:/For\ Android\ Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/x86/_deps/sdl2_content-build/include -ID:/For\ Android\ Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/x86/_deps/sdl2_content-src/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -D_FORTIFY_SOURCE=2 -Wformat -idirafter D:/For Android Portierung/ags-mas... (show balloon)


and when I try to build APKs I get this error:
Spoiler: ShowHide

Execution failed for task ':runtime:buildCMakeDebug'.
> Build command failed.
Error while executing process ninja.exe with arguments {-C D:\For Android Portierung\ags-master\Android\library\runtime\.cxx\Debug\1r4n6yv3\armeabi-v7a SDL2 ags engine hidapi pe}
ninja: Entering directory `D:\For Android Portierung\ags-master\Android\library\runtime\.cxx\Debug\1r4n6yv3\armeabi-v7a'
[1/641] Building C object _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_RLEaccel.c.o
FAILED: _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_RLEaccel.c.o
C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=armv7-none-linux-androideabi19 --gcc-toolchain=C:/Users/AmigoUfo/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/AmigoUfo/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DGL_GLEXT_PROTOTYPES -DSDL2_EXPORTS -DUSING_GENERATED_CONFIG_H -D_DEBUG -D_FILE_OFFSET_BITS=64 -I"D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-build/include" -I"D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/include" -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security  -idirafter D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/khronos  -ID:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/hidapi/hidapi  -O0 -fno-limit-debug-info  -fPIC -fsigned-char -fno-strict-aliasing -fwrapv -Wall -Wextra -Wendif-labels -Wfloat-equal -Wformat -Wformat-security -Winit-self -Winline -Wmissing-noreturn -Wpointer-arith -Wshadow -Wundef -Wwrite-strings -Wunused-result -Wno-unknown-pragmas -Wno-deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-cast-align -Wno-cast-qual -Wno-missing-declarations -Wno-switch-enum -Wno-redundant-decls -Werror=write-strings -Wbad-function-cast -Wdeclaration-after-statement -Wno-missing-prototypes -Wold-style-definition -Wstrict-prototypes -MD -MT _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_RLEaccel.c.o -MF _deps\sdl2_content-build\CMakeFiles\SDL2.dir\src\video\SDL_RLEaccel.c.o.d -o _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_RLEaccel.c.o -c "D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/SDL_RLEaccel.c"
clang: error: no such file or directory: 'Android'
clang: error: no such file or directory: 'Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/khronos'
clang: error: no such file or directory: 'Android'
clang: error: no such file or directory: 'Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/hidapi/hidapi'
[2/641] Building C object _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/timer/SDL_timer.c.o
FAILED: _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/timer/SDL_timer.c.o
C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=armv7-none-linux-androideabi19 --gcc-toolchain=C:/Users/AmigoUfo/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/AmigoUfo/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DGL_GLEXT_PROTOTYPES -DSDL2_EXPORTS -DUSING_GENERATED_CONFIG_H -D_DEBUG -D_FILE_OFFSET_BITS=64 -I"D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-build/include" -I"D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/include" -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security  -idirafter D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/khronos  -ID:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/hidapi/hidapi  -O0 -fno-limit-debug-info  -fPIC -fsigned-char -fno-strict-aliasing -fwrapv -Wall -Wextra -Wendif-labels -Wfloat-equal -Wformat -Wformat-security -Winit-self -Winline -Wmissing-noreturn -Wpointer-arith -Wshadow -Wundef -Wwrite-strings -Wunused-result -Wno-unknown-pragmas -Wno-deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-cast-align -Wno-cast-qual -Wno-missing-declarations -Wno-switch-enum -Wno-redundant-decls -Werror=write-strings -Wbad-function-cast -Wdeclaration-after-statement -Wno-missing-prototypes -Wold-style-definition -Wstrict-prototypes -MD -MT _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/timer/SDL_timer.c.o -MF _deps\sdl2_content-build\CMakeFiles\SDL2.dir\src\timer\SDL_timer.c.o.d -o _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/timer/SDL_timer.c.o -c "D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/timer/SDL_timer.c"
clang: error: no such file or directory: 'Android'
clang: error: no such file or directory: 'Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/khronos'
clang: error: no such file or directory: 'Android'
clang: error: no such file or directory: 'Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/hidapi/hidapi'
[3/641] Building C object _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/thread/SDL_thread.c.o
FAILED: _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/thread/SDL_thread.c.o
C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=armv7-none-linux-androideabi19 --gcc-toolchain=C:/Users/AmigoUfo/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/AmigoUfo/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DGL_GLEXT_PROTOTYPES -DSDL2_EXPORTS -DUSING_GENERATED_CONFIG_H -D_DEBUG -D_FILE_OFFSET_BITS=64 -I"D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-build/include" -I"D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/include" -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security  -idirafter D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/khronos  -ID:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/hidapi/hidapi  -O0 -fno-limit-debug-info  -fPIC -fsigned-char -fno-strict-aliasing -fwrapv -Wall -Wextra -Wendif-labels -Wfloat-equal -Wformat -Wformat-security -Winit-self -Winline -Wmissing-noreturn -Wpointer-arith -Wshadow -Wundef -Wwrite-strings -Wunused-result -Wno-unknown-pragmas -Wno-deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-cast-align -Wno-cast-qual -Wno-missing-declarations -Wno-switch-enum -Wno-redundant-decls -Werror=write-strings -Wbad-function-cast -Wdeclaration-after-statement -Wno-missing-prototypes -Wold-style-definition -Wstrict-prototypes -MD -MT _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/thread/SDL_thread.c.o -MF _deps\sdl2_content-build\CMakeFiles\SDL2.dir\src\thread\SDL_thread.c.o.d -o _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/thread/SDL_thread.c.o -c "D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/thread/SDL_thread.c"
clang: error: no such file or directory: 'Android'
clang: error: no such file or directory: 'Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/khronos'
clang: error: no such file or directory: 'Android'
clang: error: no such file or directory: 'Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/hidapi/hidapi'
[4/641] Building C object _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_blit.c.o
FAILED: _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_blit.c.o
C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=armv7-none-linux-androideabi19 --gcc-toolchain=C:/Users/AmigoUfo/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/AmigoUfo/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DGL_GLEXT_PROTOTYPES -DSDL2_EXPORTS -DUSING_GENERATED_CONFIG_H -D_DEBUG -D_FILE_OFFSET_BITS=64 -I"D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-build/include" -I"D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/include" -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security  -idirafter D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/khronos  -ID:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/hidapi/hidapi  -O0 -fno-limit-debug-info  -fPIC -fsigned-char -fno-strict-aliasing -fwrapv -Wall -Wextra -Wendif-labels -Wfloat-equal -Wformat -Wformat-security -Winit-self -Winline -Wmissing-noreturn -Wpointer-arith -Wshadow -Wundef -Wwrite-strings -Wunused-result -Wno-unknown-pragmas -Wno-deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-cast-align -Wno-cast-qual -Wno-missing-declarations -Wno-switch-enum -Wno-redundant-decls -Werror=write-strings -Wbad-function-cast -Wdeclaration-after-statement -Wno-missing-prototypes -Wold-style-definition -Wstrict-prototypes -MD -MT _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_blit.c.o -MF _deps\sdl2_content-build\CMakeFiles\SDL2.dir\src\video\SDL_blit.c.o.d -o _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_blit.c.o -c "D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/SDL_blit.c"
clang: error: no such file or directory: 'Android'
clang: error: no such file or directory: 'Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/khronos'
clang: error: no such file or directory: 'Android'
clang: error: no such file or directory: 'Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/hidapi/hidapi'
[5/641] Building C object _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_blit_0.c.o
FAILED: _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_blit_0.c.o
C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=armv7-none-linux-androideabi19 --gcc-toolchain=C:/Users/AmigoUfo/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/AmigoUfo/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DGL_GLEXT_PROTOTYPES -DSDL2_EXPORTS -DUSING_GENERATED_CONFIG_H -D_DEBUG -D_FILE_OFFSET_BITS=64 -I"D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-build/include" -I"D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/include" -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security  -idirafter D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/khronos  -ID:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/hidapi/hidapi  -O0 -fno-limit-debug-info  -fPIC -fsigned-char -fno-strict-aliasing -fwrapv -Wall -Wextra -Wendif-labels -Wfloat-equal -Wformat -Wformat-security -Winit-self -Winline -Wmissing-noreturn -Wpointer-arith -Wshadow -Wundef -Wwrite-strings -Wunused-result -Wno-unknown-pragmas -Wno-deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-cast-align -Wno-cast-qual -Wno-missing-declarations -Wno-switch-enum -Wno-redundant-decls -Werror=write-strings -Wbad-function-cast -Wdeclaration-after-statement -Wno-missing-prototypes -Wold-style-definition -Wstrict-prototypes -MD -MT _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_blit_0.c.o -MF _deps\sdl2_content-build\CMakeFiles\SDL2.dir\src\video\SDL_blit_0.c.o.d -o _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_blit_0.c.o -c "D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/SDL_blit_0.c"
clang: error: no such file or directory: 'Android'
clang: error: no such file or directory: 'Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/khronos'
clang: error: no such file or directory: 'Android'
clang: error: no such file or directory: 'Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/hidapi/hidapi'
[6/641] Building C object _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_blit_1.c.o
FAILED: _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_blit_1.c.o
C:\Users\AmigoUfo\AppData\Local\Android\Sdk\ndk\21.3.6528147\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=armv7-none-linux-androideabi19 --gcc-toolchain=C:/Users/AmigoUfo/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/AmigoUfo/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DGL_GLEXT_PROTOTYPES -DSDL2_EXPORTS -DUSING_GENERATED_CONFIG_H -D_DEBUG -D_FILE_OFFSET_BITS=64 -I"D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-build/include" -I"D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/include" -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security  -idirafter D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/khronos  -ID:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/hidapi/hidapi  -O0 -fno-limit-debug-info  -fPIC -fsigned-char -fno-strict-aliasing -fwrapv -Wall -Wextra -Wendif-labels -Wfloat-equal -Wformat -Wformat-security -Winit-self -Winline -Wmissing-noreturn -Wpointer-arith -Wshadow -Wundef -Wwrite-strings -Wunused-result -Wno-unknown-pragmas -Wno-deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-cast-align -Wno-cast-qual -Wno-missing-declarations -Wno-switch-enum -Wno-redundant-decls -Werror=write-strings -Wbad-function-cast -Wdeclaration-after-statement -Wno-missing-prototypes -Wold-style-definition -Wstrict-prototypes -MD -MT _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_blit_1.c.o -MF _deps\sdl2_content-build\CMakeFiles\SDL2.dir\src\video\SDL_blit_1.c.o.d -o _deps/sdl2_content-build/CMakeFiles/SDL2.dir/src/video/SDL_blit_1.c.o -c "D:/For Android Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/SDL_blit_1.c"
clang: error: no such file or directory: 'Android'
clang: error: no such file or directory: 'Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/video/khronos'
clang: error: no such file or directory: 'Android'
clang: error: no such file or directory: 'Portierung/ags-master/Android/library/runtime/.cxx/Debug/1r4n6yv3/armeabi-v7a/_deps/sdl2_content-src/src/hidapi/hidapi'
ninja: build stopped: subcommand failed.

* Try:
Run with --stacktrace option to get the stack trace.  Run with --scan to get full insights.



I tried refresh linked c++ projects but it didnt help. The 2 errors are related, it's still a matter of CMake and Ninja I think. Does anybody have some solution? I can't find a solution on the internet.

I can no longer see those red error messages  8-0 Before I got that last error, I fixed 2 errors.
Truly, truly, i say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

eri0o

Re: Let's build for Android!
« Reply #56 on: 13 Sep 2021, 18:12 »
Hey Amir,

Instead of going this way try, closing Android Studio, and  downloading the android prebuilt libraries here first: https://github.com/adventuregamestudio/ags/releases/tag/v.3.6.0.8

It's the file named AGS-3.6.0.8-android-libs-release.zip, then just go into the project directory and extract the libraries in the directory mentioned in the README, it should be here

https://github.com/adventuregamestudio/ags/tree/master/Android/library/runtime/libs

There's a txt file there, make sure the directory looks like it's mentioned in it! Don't download the debug libraries, use the ones marked release.

If all goes well Gradle will pickup the libraries.

The idea of using Artic Fox and newer android studio is that in them you can get both CMake and ninja without installing them externally, just by ticking the option in the SDL Tools menu, for cmake and ndk sideload. Regardless, if you use the pre-built libraries, neither ndk, cmake or Ninja are needed.

Re: Let's build for Android!
« Reply #57 on: 13 Sep 2021, 23:46 »
Ahaaa that was my question on August 27th.

Quote
I'm using AGS 3.4.3 so I'm using Android libs of this version or do I have to use the libs of AGS 3.6.0?

Quote
The idea of using Artic Fox and newer android studio is that in them you can get both CMake and ninja without installing them externally, just by ticking the option in the SDL Tools menu, for cmake and ndk sideload. Regardless, if you use the pre-built libraries, neither ndk, cmake or Ninja are needed.

Wow that's cool, good to know. but I've already downloaded everything, I'll leave everything as I downloaded, it doesn't do any harm I think. so I will try tomorrow the AGS-3.6.0.8-android-libs-release and let u know. Thank u. Good night.
Truly, truly, i say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

eri0o

Re: Let's build for Android!
« Reply #58 on: 14 Sep 2021, 13:19 »
The way it works, is like this, gradle will look if there's a file libengine.so in the library/runtime/libs/arm64-v8a/ dir ( there should be one directory for each processor architecture in the zip file, all are needed). This is done in code in the build gradle here:

https://github.com/adventuregamestudio/ags/blob/bc79bb9fe1f4421f2cde15f33172a388bbe9a733/Android/library/runtime/build.gradle#L69

So no need to change anything, just extracting the libraries in this place, one directory for each architecture. Then the project will pickup the pre-built instead of rebuilding.

There has been a new AGS release now, so you can pickup the Android libraries here now: https://github.com/adventuregamestudio/ags/releases/tag/v.3.6.0.9

Once the SDL2 version of the engine is more stable these android libraries will be also linked in the forums, but for now, just pickup the 3.6.0.X releases from GitHub.

Also for reference, if anyone is reading and want to build the C++ native parts of the engine, the config to tick in Android Studio is here

Spoiler: ShowHide


This is not needed when using the pre-built libraries.
« Last Edit: 14 Sep 2021, 13:22 by eri0o »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: Let's build for Android!
« Reply #59 on: 14 Sep 2021, 13:29 »
Once the SDL2 version of the engine is more stable these android libraries will be also linked in the forums

I started linking them in 3.6.0 thread since yesterday :)