HOW to get apk onto android?

Discussion in 'Android Development' started by seejayjames, May 2, 2013.

  1. seejayjames

    seejayjames

    Member

    Joined:
    Jan 28, 2013
    Messages:
    56
    Got Android Unity add-on. Builds apk fine. Connected OK. All Android SDK files installed OK. It gets to my tablet (Android 4.0) and asks to install, but then: "Application not installed". No other information. Yes, I have "Allow installation of non-market apps" checked.

    As much as I love the idea of Android, this is an enormous pain, same as it was with GameMaker when trying to put apps on there. Took a whole evening to figure out. Plug and play it isn't! When you have to search online for HOURS to figure out the idiosyncrasies.......there's something seriously wrong.

    Anyway, I'm totally pumped to try out my Unity app on my tablet. Any words of wisdom for how to install it??
     
  2. seejayjames

    seejayjames

    Member

    Joined:
    Jan 28, 2013
    Messages:
    56
    Installation failed with the following output:
    pkg: /data/local/tmp/Package.apk

    Failure [INSTALL_FAILED_CONTAINER_ERROR]

    2986 KB/s (9307935 bytes in 3.043s)

    UnityEngine.Debug:LogError(Object)
    PostProcessAndroidPlayer:UploadAndStartPlayer(String, String, String, String, String, Boolean, Boolean, Boolean) (at C:/BuildAgent/work/7535de4ca26c26ac/Editor/Mono/BuildPipeline/PostProcessAndroidPlayer.cs:835)
    PostProcessAndroidPlayer:postProcessInternal(BuildTarget, String, String, String, String, String, String, BuildOptions) (at C:/BuildAgent/work/7535de4ca26c26ac/Editor/Mono/BuildPipeline/PostProcessAndroidPlayer.cs:494)
    PostProcessAndroidPlayer:postProcess(BuildTarget, String, String, String, String, String, String, BuildOptions) (at C:/BuildAgent/work/7535de4ca26c26ac/Editor/Mono/BuildPipeline/PostProcessAndroidPlayer.cs:147)
    UnityEditor.HostView:OnGUI()
     
  3. seejayjames

    seejayjames

    Member

    Joined:
    Jan 28, 2013
    Messages:
    56
    Tried multiple different things, debugkey delete (found on old unity forum post), using debug key password I found from searching android dev pages, argh. it is all very vague and has taken an entire night to get exactly nowhere. please help.
     
  4. nikolic

    nikolic

    Member

    Joined:
    Oct 15, 2011
    Messages:
    162
    Try the following:

    Player Settings => Install Location => Automatic
     
  5. seejayjames

    seejayjames

    Member

    Joined:
    Jan 28, 2013
    Messages:
    56
    YES!!!

    Now how I would have known that, I'm not sure. Probably missed it in the docs...one can only read so much before giving up...

    Thinking a bit more, what I mentioned about GameMaker in the post above wasn't fair, it built the APK fine. The issue was getting it onto the device, which was an XP problem...wound up having to copy to my Mac and then use a program to copy it to the device, then install on the device. So that was more user error than anything, but still, it took a lot of searching to figure out.

    Anyway, your advice did it. I can't thank you enough! Now it's back to the fun stuff...making my game!
     
  6. seejayjames

    seejayjames

    Member

    Joined:
    Jan 28, 2013
    Messages:
    56
    From the docs, I found this:

    Install Location Specifies application install location on the device (for detailed information, please refer to http://developer.android.com/guide/appendix/install-location.html).
    Automatic Let OS decide. User will be able to move the app back and forth.
    Prefer External Install app to external storage (SD-Card) if possible. OS does not guarantee that will be possible; if not, the app will be installed to internal memory.
    Force Internal Force app to be installed into internal memory. User will be unable to move the app to external storage.

    So, it would make sense that it wouldn't work if it was "Force external" and there was no SD card, but it's "Prefer External" and it claims that if there's no SD card, "the app will be installed to internal memory." Well...apparently not, at least in this case.

    Anyway, it's resolved now, so hopefully this is good info for others down the road. Thanks again for the solution!

    How to mark this thread as solved? Couldn't find out how to do that...
     
  7. Frank Nguyen

    Frank Nguyen

    Member

    Joined:
    Mar 3, 2014
    Messages:
    4
    You saved my life (y)