Sketch compiles on phone but crashes before it starts

edited May 2017 in Android Mode

Basically what i said on the title, i downloaded processing 3.3, android mode 4 (because all i care about is cardboard, so please don't tell me to use another version unless there's a way to do cardboard there) and autodownloaded the SDK because i couldn't make it work manually no matter what i tried. Processing opens up, detects my phone, i paste the getting started example, compiles on my phone, no problems. But then i open the app, it stays white for like 5 seconds, and then crashes with the typical "app has stopped" alert.

FYI i have a samsung s3 mini (android 4.1, api 16). I'm pretty sure it's a problem with the API. Processing auto-downloads api 25 and never cares to ask about downloading other versions, i manually did with SDK manager but there's no place to set the api. BTW i once managed to run an app i made in processing (normal java mode) compiling the .pde directly on the phone with some "AIDE" app. It was a lot of trouble tho. And i can make and run apps from Unity no problem. So it's not a problem with USB driver either.

So.. any ideas? anyone got anything running on api 16? if so, how?

Tagged:

Answers

  • edited May 2017

    help plz. I managed to run something extremly simple using APDE, the android processing IDE. But i seriously doubt i can import libraries and do more complex stuff. And even if i did.. id rather make everything on the computer and just install an apk on my phone if possible

  • Processing auto-downloads api 25 and never cares to ask about downloading other versions, i manually did with SDK manager but there's no place to set the api.

    I did notice you cannot select the API target anymore in the Processing IDE >> Android menu. However you can select it in the manifest file: <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="25"/> I would also uninstalled the API 25 and only have the 16 installed to force Processing Android mod to use a lower one. However, this is all untested business and I am just giving you ideas of what I would do if i were in your case.

    Is it possible to provide your code? Or are you suing the one on the Processing Android website? I could try to run it tomorrow or Friday, whenever time permits.

    Kf

  • edited May 2017

    I tried to "hide" api 25 by changing the folder's name and it made androidMode4 unable to run. It won't accept anything lower than api25. So i guess i must settle for just run any android app, i'll see what i can do about cardboard later. Anyways.. since that didn't run, i tried with AndroidMode 250, someone told me he was able to run shit with it, and that one allowed me to pick API16, but this one gives me errors while compiling. Let me try to copy the error.

    BUILD FAILED C:\folders...\sdk\tools\ant\build.xml:888: The following error ocurred while executing this line: C:\folders...\sdk\tools\ant\build.xml:890: The following error ocurred while executing this line: C:\folders...\sdk\tools\ant\build.xml:902: The following error ocurred while executing this line: C:\folders...\sdk\tools\ant\build.xml:283: null returned 1 Total time: 2 seconds

    I also changed the manifest and the preferences to suit my API16 needs, but it's pointless, same error. I tried with processing 3.3.3, processing 3.2.4, and for some reason processing 2.2.1 is not running android mode at all today, i managed to make android mode run on it yesterday but no luck there either

    btw i first used the "getting started" example on processing android page. Now im using a 30 lines code that makes rects on each corner of the screen using a random and switch. It's extremly simple and i doubt that's the source of the problem, but just in case.

Sign In or Register to comment.