From Buildbox To Android Studio To Android Device [tutorial]

Discussion in 'How Can I...?' started by khalid, Sep 27, 2016.

  1. khalid

    khalid Avid Boxer

    Joined:
    Feb 17, 2016
    Messages:
    343
    Likes Received:
    67
  2. Gregory Storm

    Gregory Storm Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    169
    Likes Received:
    130
    What JDK version are you using?
     
  3. khalid

    khalid Avid Boxer

    Joined:
    Feb 17, 2016
    Messages:
    343
    Likes Received:
    67
    from release file in jre directory which comes with Android Studio 2.2

    JAVA_VERSION="1.8.0_76"
    OS_NAME="Windows"
    OS_VERSION="5.2"
    OS_ARCH="amd64"
    SOURCE=""
     
    Last edited: Sep 28, 2016
  4. roy

    roy Boxer

    Joined:
    Jul 23, 2016
    Messages:
    69
    Likes Received:
    27
    Thank you for a great tutorial, @lqifqkt ! You made it real easy to switch to Android Studio. :)

    One note about the exclude you do on the support-v4 lib. You should instead get rid of the old version of the lib that is included when exporting from Buildbox.

    I suppose it's related to the Buildbox features I'm not using, but I didn't have to use multidex and I could also remove the other jars included.
     
    khalid likes this.
  5. khalid

    khalid Avid Boxer

    Joined:
    Feb 17, 2016
    Messages:
    343
    Likes Received:
    67
    I liked your post man

    Buildbox is not exporting files to be used by Android Studio yet, but they are moving towards that

    and I think the coming versions of BB will be more compatible with Android Studio that's way we should encourage builboxers to move to Android Studio

    Regards,
     
  6. khalid

    khalid Avid Boxer

    Joined:
    Feb 17, 2016
    Messages:
    343
    Likes Received:
    67
    In build.gradle

    Put this in android
    Code:
    configurations {
            all*.exclude group: 'com.android.support', module: 'support-v4'
        }
    
    in dependences change this
    Code:
        compile ('com.google.android.gms:play-services:+'){exclude module: 'support-v4'}
    
    to become
    Code:
        compile 'com.google.android.gms:play-services:+'
    
     
  7. yepez7

    yepez7 Boxer

    Joined:
    Oct 26, 2016
    Messages:
    55
    Likes Received:
    3
    i have a problem it does show in the emulator but the application doesn't run on my device. it does show the icon but doesn't run it
     
  8. khalid

    khalid Avid Boxer

    Joined:
    Feb 17, 2016
    Messages:
    343
    Likes Received:
    67
    This means that the game is installed but there some errors in it.

    You need to debug it via the device logs
     
    wgoodpaster likes this.
  9. yepez7

    yepez7 Boxer

    Joined:
    Oct 26, 2016
    Messages:
    55
    Likes Received:
    3
    How can I do that?

    Is there a video of it?
     
    wgoodpaster likes this.
  10. khalid

    khalid Avid Boxer

    Joined:
    Feb 17, 2016
    Messages:
    343
    Likes Received:
    67
    This needs a new tutorial to understand device logs.
    Anyway in short you can view the device logs from Android Studio by running the game on a debug enabled device/mobile then from tools android device monitor and logcat tap.
     
  11. mousik

    mousik Boxer

    Joined:
    Apr 1, 2017
    Messages:
    23
    Likes Received:
    1
  12. khalid

    khalid Avid Boxer

    Joined:
    Feb 17, 2016
    Messages:
    343
    Likes Received:
    67
    What is in red is not the appropriate way of excluding a module nor for enabling multidex!! Both lines should be removed from dependencies


    The exclusion need to be added in configurations like this
    all*.exclude group: 'com.android.support', module: 'support-v4'

    The compile ('com.android.support:multidex:1.0.1') should be removed then add the following in the
    defaultConfig

    multiDexEnabled true

    If you don't know how to do it we have a paid service to fix this for you with 10$

    good luck
     
    Last edited: Apr 15, 2017
  13. flymoon

    flymoon Boxer

    Joined:
    Jun 9, 2017
    Messages:
    9
    Likes Received:
    0
  14. whitedogapp

    whitedogapp Avid Boxer

    Joined:
    Oct 8, 2015
    Messages:
    294
    Likes Received:
    72
    hi, i did every thing like in tutorial but geting erro whe it says support v4 is dublicated
     
  15. happydays

    happydays Boxer

    Joined:
    Feb 14, 2017
    Messages:
    45
    Likes Received:
    12
    In your build gradle dependencies, change
    compile ('com.google.android.gms:play-services:+'){exclude module: 'support-v4'}, to
    compile 'com.google.android.gms:play-services:+'
    and take out libs/support (the last line) in dependencies.

    **Dont know why there are goofy faces
     

Share This Page