Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / AGK Tier 2 application crashes on startup

Author
Message
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 1st Feb 2012 17:20 Edited at: 2nd Feb 2012 14:21
As in the title,

Do you have any known problems/solutions for that? It crashes just in startup and i have to force close it.

It crashes on my android mobile phone only, but works on the emulators. ( I have version 2.3.7, for emulators i use 2.3.1 and tried 2.3.3 too. Both did work. )

Debug logs:




My AndroidManifest.xml:




The project is placed under templates folder.
Also, i am sure it's not the template.cpp code, as i tried to run it with agk::Sync() only, and it didn't work either.

------------ADDED-----------------

I've just found out i should have my project in /apps/ folder. But now, when i do, i cannot compile it with NDK. There's one error that always appears there:




With the exception that it's not always libtemplate.so, can be Core.o and so on.

http://www.kamacdev.wordpress.com ~ My developer blog, mind paying a visit ?
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 2nd Feb 2012 14:37 Edited at: 2nd Feb 2012 15:25
@Bump

Here is logcat:



Plus, i am using a copy of template_android from /templates/ folder.

Also, when i Project->Clean, I get:



And i cannot run the project as i have to refresh it.

Could anybody help me?

http://www.kamacdev.wordpress.com ~ My developer blog, mind paying a visit ?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Feb 2012 16:00
It is saying that it can't find the native NDK library built with cygwin, it thinks it is named "template". This will be from the AndroidManifest.xml file from the line



We used "android_player" as the lib name instead of "template" for our compilations. If you want to keep the name template you'll have to make cygwin rename the library as well. In /jni/Android.mk the line



Is the compiled name of the module, this must match the one in AndroidManifest.xml
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 2nd Feb 2012 16:33 Edited at: 2nd Feb 2012 16:40
I have:



There already. Maybe i missed something else?
I have to remind that i am using Tier 2, so i am not using interpreter_android, but template_android. Right?

Also, is that right that eclipse doesn't find agk.h in the editor?:



http://www.kamacdev.wordpress.com ~ My developer blog, mind paying a visit ?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Feb 2012 18:07
As long as cygwin doesn't complain about the missing include file when it compiles it'll be fine.

I just noticed in your AndroidManifest.xml you have hasCode="false", this must be set to true so it can find your lib.
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 2nd Feb 2012 18:23
It works!

Thank you !

http://www.kamacdev.wordpress.com ~ My developer blog, mind paying a visit ?

Login to post a reply

Server time is: 2024-11-10 01:25:15
Your offset time is: 2024-11-10 01:25:15