Android - errors loading a project

Previous topic - Next topic

Kitty Hello

Hello. Now it's me having trouble. I deleted the android_studio folder and re-created everything. Then fired up the freshly installed Android Studio and got some errors:
Code (glbasic) Select

cvc-complex-type.2.4.a: Invalid content was found starting with element 'extension-level'. One of '{layoutlib}' is expected.
cvc-complex-type.2.4.a: Invalid content was found starting with element 'base-extension'. One of '{codename, tag}' is expected.

> java.lang.NullPointerException (no error message)

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

* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:79)
at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:72)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$600(LifecycleProjectEvaluator.java:53)
at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate.run(LifecycleProjectEvaluator.java:198)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject$1.run(LifecycleProjectEvaluator.java:111)
at org.gradle.internal.Factories$1.create(Factories.java:25)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:183)
at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:40)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:226)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withMutableState(DefaultProjectStateRegistry.java:220)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withMutableState(DefaultProjectStateRegistry.java:186)
at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:95)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:67)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:693)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:141)
at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:62)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:41)
at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuild.run(DefaultGradleLauncher.java:302)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.initialization.DefaultGradleLauncher.configureBuild(DefaultGradleLauncher.java:210)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)
at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:134)
at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.java:58)
at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.java:55)
at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.java:82)
at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.java:75)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:183)
at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:40)
at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:75)
at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:55)
at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.run(ClientProvidedPhasedActionRunner.java:60)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:58)
at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:39)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:49)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:44)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:315)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:305)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:101)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:44)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:49)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:46)
at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:78)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:46)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:31)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:42)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:28)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:78)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:52)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:59)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:36)
at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:68)
at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:38)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:37)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:26)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:60)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:32)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:55)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:41)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:48)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:32)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:81)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: java.lang.NullPointerException
at com.android.build.gradle.internal.ndk.NdkHandler.getPlatformVersion(NdkHandler.java:121)
at com.android.build.gradle.internal.ndk.NdkHandler.supports64Bits(NdkHandler.java:221)
at com.android.build.gradle.internal.ndk.NdkHandler.getSupportedAbis(NdkHandler.java:269)
at com.android.build.gradle.tasks.ExternalNativeJsonGenerator.createImpl(ExternalNativeJsonGenerator.java:563)
at com.android.build.gradle.tasks.ExternalNativeJsonGenerator.create(ExternalNativeJsonGenerator.java:480)
at com.android.build.gradle.internal.TaskManager.createExternalNativeBuildJsonGenerators(TaskManager.java:1519)
...
[/ocde]

When I try to build, I get:
[code=glbasic]
java.lang.IllegalArgumentException: Each request requires the same not null build mode to be set
at com.android.tools.idea.gradle.project.build.invoker.GradleBuildInvokerImpl.executeAssembleTasks(GradleBuildInvokerImpl.kt:165)
at com.android.tools.idea.gradle.project.build.invoker.GradleBuildInvokerImpl.assemble(GradleBuildInvokerImpl.kt:211)
at com.android.tools.idea.gradle.project.build.invoker.GradleBuildInvokerImpl.assemble(GradleBuildInvokerImpl.kt:205)
at com.android.tools.idea.gradle.actions.MakeGradleProjectAction.doPerform(MakeGradleProjectAction.java:45)
at com.android.tools.idea.gradle.actions.AndroidStudioGradleAction.actionPerformed(AndroidStudioGradleAction.java:63)
at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:239)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:260)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:239)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$performAction$0(ActionMenuItem.java:277)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:236)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:67)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.performAction(ActionMenuItem.java:269)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:284)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$2(ActionMenuItem.java:111)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:541)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:571)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6654)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
at java.desktop/java.awt.Component.processEvent(Component.java:6419)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2790)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:820)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:757)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:498)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Can someone help me, please :)

spacefractal

Im havent touched Android in about a year and yet to reinstall anything my self.

When im google it, its could been something like this, etc the Java Virtual Machine is not setup:

https://stackoverflow.com/questions/49788977/faced-with-org-gradle-api-projectconfigurationexception-error-on-my-gradle-bu

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kitty Hello

I found, I had to change
In File -> Project Structure, set Android Gradle Plugin Version 7.0.3 And Gradle Version 7.0.2.
I chose 7.3.1 and 7.6.
Then, Android Studio downloaded the NDK for me and it seems, that it built it properly.
Now, stdafx_sdl.h is missing :)
It's quite an adventure.

Kitty Hello

One step further. Still getting 3 errors now:
Code (glbasic) Select

> Task :app:buildNdkBuildDebug[arm64-v8a] FAILED
C/C++: ld: error: C:\Users\gf\Documents\GLBasic\TwinTris\distribute\android_studio\app\build\intermediates\cxx\Debug\636m5v26/obj/local/arm64-v8a/objs-debug/main/glbasic/lib_glbasic.o: unable to find library from dependent library specifier: SDL.lib
...

Execution failed for task ':app:checkDebugAarMetadata'.
> Configuration `:app:debugRuntimeClasspath` contains AndroidX dependencies, but the `android.useAndroidX` property is not enabled, which may cause runtime issues.
  Set `android.useAndroidX=true` in the `gradle.properties` file and retry.
....


> com.android.ide.common.process.ProcessException: make: Nothing to be done for 'SDL2'.
  make: Nothing to be done for 'SDL2_mixer'.
  make: Nothing to be done for 'hidapi'.
  make: Nothing to be done for 'jpg'.
  [arm64-v8a] SharedLibrary  : libmain.so
 
  C++ build system [build] failed while executing:
      @echo off
      "C:\\Users\\gf\\AppData\\Local\\Android\\Sdk\\ndk\\23.1.7779620\\ndk-build.cmd" ^
        "NDK_PROJECT_PATH=null" ^
        "APP_BUILD_SCRIPT=C:\\Users\\gf\\Documents\\GLBasic\\TwinTris\\distribute\\android_studio\\app\\jni\\Android.mk" ^
        "NDK_APPLICATION_MK=C:\\Users\\gf\\Documents\\GLBasic\\TwinTris\\distribute\\android_studio\\app\\jni\\Application.mk" ^
        "APP_ABI=arm64-v8a" ^
        "NDK_ALL_ABIS=arm64-v8a" ^
        "NDK_DEBUG=1" ^
        "NDK_OUT=C:\\Users\\gf\\Documents\\GLBasic\\TwinTris\\distribute\\android_studio\\app\\build\\intermediates\\cxx\\Debug\\636m5v26/obj" ^
        "NDK_LIBS_OUT=C:\\Users\\gf\\Documents\\GLBasic\\TwinTris\\distribute\\android_studio\\app\\build\\intermediates\\cxx\\Debug\\636m5v26/lib" ^
        "APP_PLATFORM=android-18" ^
        SDL2 ^
        SDL2_mixer ^
        hidapi ^
        jpg ^
        main ^
        mpg123 ^
        png ^
        zlib
    from C:\Users\gf\Documents\GLBasic\TwinTris\distribute\android_studio\app
  ld: error: C:\Users\gf\Documents\GLBasic\TwinTris\distribute\android_studio\app\build\intermediates\cxx\Debug\636m5v26/obj/local/arm64-v8a/objs-debug/main/glbasic/lib_glbasic.o: unable to find library from dependent library specifier: SDL.lib
  ld: error: C:\Users\gf\Documents\GLBasic\TwinTris\distribute\android_studio\app\build\intermediates\cxx\Debug\636m5v26/obj/local/arm64-v8a/objs-debug/main/glbasic/lib_glbasic.o: unable to find library from dependent library specifier: SDL_mixer.lib
  ld: error: C:\Users\gf\Documents\GLBasic\TwinTris\distribute\android_studio\app\build\intermediates\cxx\Debug\636m5v26/obj/local/arm64-v8a/objs-debug/main/glbasic/lib_glbasic.o: unable to find library from dependent library specifier: SDLmain.lib
  ld: error: C:\Users\gf\Documents\GLBasic\TwinTris\distribute\android_studio\app\build\intermediates\cxx\Debug\636m5v26/obj/local/arm64-v8a/objs-debug/main/glbasic/lib_glbasic.o: unable to find library from dependent library specifier: SDL_mixer.lib
  clang++: error: linker command failed with exit code 1 (use -v to see invocation)
  make: *** [C:/Users/gf/AppData/Local/Android/Sdk/ndk/23.1.7779620/build//../build/core/build-binary.mk:715: C:\Users\gf\Documents\GLBasic\TwinTris\distribute\android_studio\app\build\intermediates\cxx\Debug\636m5v26/obj/local/arm64-v8a/libmain.so] Error 1


spacefractal

chosen to delete the android studio mess thread and is now looking into it again. What im can see, we need to update the grandle and plugin version in the newest Android Studio what we have used.

Also we need somehow to spefifik which NDK version as well CMAKE we using as its seen they are not downloaded, and then its cant run the SO file.... hmmm.

But in the other work Grandle does do something on a fresh Window 10 installation (on a another machine).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

#5
Hi, all

I havent been here due to work etc etc ...

I am still managing my android apps...

I use NDK Resolution Outcome: Project settings: Gradle model version=5.1.1, NDK version=21.0.6113669

And recently today just build an update with aab package for api 33 (android 13)
[premature - it builds but it wont run yet, need changes for manifest and other android 12-13 requirements - which are done within Android studio itself]

Seems to work fine for me...
I have not been upgrading gradle as that would lead me into a mess i expect....
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

MrPlow

In the past I  posted a reply and jni folder link to a past forum user for helping get past some of the jni code bugs....etc
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

MrPlow

#7
Also, the build of a new android studio project has a few steps to go through before builds can work...
one of the first is the icon creation for missing icons in android studio itself...then manifest format to an acceptable correct version...and app package name etc etc..

I think some of those are on past posts of mine & fractals too....
its a mini checklist of sorts...
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

MrPlow

Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

#9
in the newest Android Studio (Electric Eel), we can no longer uses Grandle v5.1.1 as its was the newest im could get it to work property. For us, its would been better to get it to work again wiith that version, even we could still stick to a older version of Android Studio (im not remember which version its was).

So this would take some time and hopefully can get it fully works with the newest Android Studio version with a newer grandle and plugin to a least version 7. Various things has been changed, and grandle like 5.1.1 has long time been depreacted (im do wonder why its so still listed in Android Studio, when we cant uses it?).

You also might have a older version of Android Studio.

Howover HTML5 is fun really.

PS. Grandle diddent want to work at all on the main machine, but recently actuelly purchased a new "old" machine for a another project, but here Android Studio grandle thing does work. So something installation has been failed for me.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

I am using Android Studio 3.5.3

I'm not getting any annoying messages to update or anything...yet
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

MrPlow

#11
Update:
Using current gradle and android studio 3.5.3

I built Android 12 version of one of my apps...

Only other requirement
compsdkver = 31
targetsdk = 31
minsdk = 23

in manifest file you need to add in following exported line

  android:exported="true"

Code (glbasic) Select
<activity android:name="SDLGlbasic"

            android:theme="@style/MyTheme"
            android:label="@string/app_name"
            android:screenOrientation="sensor"
            android:minAspectRatio="1.2"
            android:maxAspectRatio="2.4"
            android:exported="true"
            android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
            </intent-filter>
        </activity>


Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

we do still want to uses the newest version and the pitfalls its might have. Gernot and me also have plans to ditch Android as its too hard too maintain it. But, the fixes im have do with HTML5 is very good and could been used as a base for extractly Android and so on.

So that why im currectly have choosen to have focus on that.

android studio 3.5.3 is a quite older version from 2019.

But nice to know.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

Quote from: spacefractal on 2023-Feb-13
we do still want to uses the newest version and the pitfalls its might have. Gernot and me also have plans to ditch Android as its too hard too maintain it. But, the fixes im have do with HTML5 is very good and could been used as a base for extractly Android and so on.

So that why im currectly have choosen to have focus on that.

android studio 3.5.3 is a quite older version from 2019.

But nice to know.

But Android is main use for me - HTML5 is nice too, but does not perform like Android jni apps do...
I wouldn't be able to publish or update apps if android was removed...

I have a small issue with a converted app project

Getting this odd bug...
1 error only ... so quite simple answer for this i think?

lib_glbasic.cpp:11954: error: undefined reference to '__GLBASIC__::__MainGameSub_()'
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

#14
Im have changed so much, so PowerUp Elevation perform just like its was a native app. only missing for testing is game controller and way to integrate ads or such.

Im also only checked my Snoopy game and PowerUp Elevations. Both games performs very well.

Also we might move to html5/webgl apps for Android (Android Studio would still been required throught), because its can been easier to mainsteam it.

Im have no idea about the issue with that line only with no code to look at.

Property a external call that should not been do that. No idea. can been anything.

howover im do using html5/webgl platform, and NOT the normal html5 one also showing (that one fails its seen, but we also dont need it throught).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/