sdl2 , trying to run app on phone, not working?

closed account (N8RzwA7f)
Hi,

I managed to 'ant debug install' my app successfully, but when I click it , I just see a vague smaller black rectangle and it crashes. It off course runs fine on desktop.

I was wondering if I have to change some main.xlmns values as in here?

https://developer.android.com/training/multiscreen/screensizes.html

but I don't have a clue what to do then, I really hope I won't have to go through these tutorials as well, it just never ends!!
thanks:)
closed account (N8RzwA7f)
could it be caused by a folder (called sounds, with sound files) inside the assets folder?
I have the paths coded as such : "sounds/somesounds/sound.mp3"
thanks
closed account (N8RzwA7f)
I'm trying with adb logcat , and get some message: calling a method in the system process without a qualified user: and a whole bunch of text...
ugh this feels so hopeless :(
closed account (N8RzwA7f)
can anyone offer any input at all? I tried to install the sample program at lazy foo but I get the same result actually, while ant debug install works fine ? Taping the app on the phone just produces a flash black screen and crash.
how would i use adb logcat or where can I find the output from sdl-log ?

thanks :)
closed account (N8RzwA7f)
I am desperate , please please help :( I have had to reinstall every library and still nothing is working.
I have tried absolutely everything for a way too long time now.

right now I have five files in my jni/src folder : main.cpp , mainScreen.cpp, mainScreen.h, gameWindow.cpp, gameWindow.h.

i get the following error when running ndk-build from androidprojects/jni :

undefined reference to mainScreen::mainScreen();
undefined reference to mainScreen::initialize();
undefined reference to mainScreen::loadstartScreen();

and more errors like it from main.cpp , it seems to stop building at: sharedlibrary:libmain.so
any idea at all?
as a side note, woudl it be possible to use some online emulator to test my app for android?
my code works fine on my laptop(laptop version code) , only i can't test the touch functionality off course of my mobile version.
thanks
Last edited on
closed account (N8RzwA7f)
so if my laptop version works fine on my laptop, it shouldn't be a problem to run my mobile version , should it ? I'm just also worried it's my code that's faulty.

I just changed such cases as : case SDL_MOUSEBUTTONUP to case SDL_FINGERUP
and such lines as : event.button.x to event.tfinger.x



and I update this line:

image = IMG_Load("/sdcard/imagename.type");

to this:

SDL_RWops *file = SDL_RWFromFile("imagename.type", "rb");
image = IMG_Load_RW(file, 1);

think that was all. Is that enough ?
closed account (N8RzwA7f)
oke so do I need to change the include paths in the jni/src android.mk file to include addtional source and header files ? is it even possible to use multiple files ? maybe this is why i'm getting the undefined reference errors ??

hope to get some answer soon, anything, i've been at this for two weeks now , getting my app to run on a phone ???


please answer :(
closed account (N8RzwA7f)
I'm having major panic attacks now :( why is my code working fine on my laptop but nothing is working in mobile. I get a milion errors when I ndk-build :(

please don't ignore me
Topic archived. No new replies allowed.