Get an ERROR when select 'Run ond device' (android)

edited April 5 in Android Mode

Hi all,

I'm absolutely new with android development, but I'm a fan of Processing. I try to get a app running on my device (Galaxy S3 or HUAWEI Ascend Y210).

When I select the 'Run on Device' menu I get at the end the message:

...
_debug:
Failure [INSTALL_FAILED_UID_CHANGED]
Shutting down any existing adb server..._

I searched in the forum with this error, but I didn't find something. The points I got with a web search weren't helpfull as well. :(

I use the API 4.3.1, but I think thats not the point, why I' getting this error.

Does anybody have an idea what went wrong here with my configuration?

With the 'Android Studio' I got a very simple example running. (Just to see if drivers are installed propperly)

Thanx in advance and happy coding Michi

Answers

  • Very few people has experience with admob or any advertisement in android (from what I have seen so far in the forum.... maybe there are just shy) You are better off if you share your code, or at least the more relevant parts of it. Please provide also any other relevant detail. It will be useful to know where did you get this code or at least, if you had it running before. I believe you also need an account to run this code, some sort of credentials after successfully registering to any of those services.

    Kf

  • Hi, thank you for your answere, the app didn't ran before... but I think the point is not the app or sketch itself, but more one step before I get it running at the device.

    The error message appears at the end of the build sequence ... when the APK shall be loaded to the device. In the 'Android' menu I selected the device to which I'd like to load the app.

    Please let me know if I shall give you some more info ... since I'm beginning with this stuff, I don't know which info could be helpfull.

    Thanx in advance Michi

  • edited April 6

    @Mininimik===

    i have got this message.

    normally (error message) it happens when you have an app (and package) already installed and you are trying to install it again from another computer. is it your case? first thing is to verify (app manager) wether it exists some app with the same package name. if so: destroy it! if you cannot destroy tell me why (permissions...)

  • Thank you akenaton,

    but this message appeared with the first try to upload to the phone. I tried to find a package with the same name, but there is None.

    Do I Need root rights on the phone? I don't think so, I set the phone to the Debug/Devopment mode... with the android studio it was possible to upload a test app.

    Thanx Michi

  • @Minimik===

    does this error appears with all apps that you want to install???

  • Yes, I had only one, but I tried it with an other an I got the same message.

  • edited April 8

    @Minimik===

    So:

    it is the same phone (connected by USB and debug) it is the same laptop BUT you say that you have successfully loaded an app with AS... is this app the same that you are using now??

    in the android docs, about UID you can read::

    "By default, the system assigns each app a unique Linux user ID (the ID is used only by the system and is unknown to the app). The system sets permissions for all the files in an app so that only the user ID assigned to that app can access them."

  • Thank you,

    yes I used the same phone for both attempts. In my understanding the apps are different... with AS I just created a Project with a default app ('Hello world'). With processing I stepped through the tutorial at 'http://android.processing.org'. The PC is for both the same... but these days I will check it with a different PC. Hopefully I will see some progress.

    Sorry I'm not very familiar with this theme. My hope was, that I can do a kind of lerning on the fly. My hope was, I install the Processing on my PC, and I can create very easyly an simple App which just shows an ellipse. :(( After that feeling of success I'd like to care about the actual Task of creating a Bluetooth Connection to my Arduino. :)>-

    Thanx for you Support Michi

  • I'm having the same problem. I just followed all the instructions from (http://http://android.processing.org/install.html). Isntalled SDK automatically and then installed "Android 5.1.1 (Api 22)" (which is the same version that I'm running on my tablet) from SDK manager via processing android mode. I try to run the code from the example and i can't make it work.

    void setup() {
      fullScreen();
      noStroke();
      fill(0);
    }
    
    void draw() {
      background(204);
      if (mousePressed) {
        if (mouseX < width/2) {
          rect(0, 0, width/2, height); // Left
        } else {
          rect(width/2, 0, width/2, height); // Right
        }
      }
    }
    

    erro As you can see on the image the code appears to be filled with errors, is that normal? Also When I try to run the sketch on the emulator it always crashes. I've uninstalled, re-installed... I don't know what to do

  • Notice that the latest release of the Android SDK is not compatible with the current Android mode. The problem is the SDK tools were removed in recent version of the Android SDK and Processing Android mode still uses these tools.

    Check the following post: https://forum.processing.org/two/discussion/21588/running-sketches-on-my-smartphone-does-not-work-anymore#latest

    Related to the errors in the IDE in Android mode, o not pay attention to them. The error highlighter utility in Android mode doesn't work properly unfortunately.

    Related to screenshots, it is recommended to copy and paste your error in the forum. The reason is that we cannot read screenshots most of the time and people cannot search for this info (errors for example) using the forum search engine or google.

    One last thing, it is recommended to run your first sketches on an actual device instead of an emulator. If not done so, you need to provide what is your OS, Processing version, android mode version, Android SDK version, Target API (usually 21 an 23 have worked in the past) and info about your phone. Also if you have run previous android programs, please say so, even if you have done it in eclipse or AS.

    Hopefully you can get running an app on your phone sooner than later.

    Kf

Sign In or Register to comment.