User Tag List

Results 1 to 10 of 10

Thread: Android and Java SDK when building?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,256
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question Android and Java SDK when building?

    I am trying to build an android apk for the first time again in years and when I do it asks me to pinpoint the folder to my Adroid SDK and Java SDK. I have no idea where these are though and if I need to download something and install or setup and from where and how? Is there any instructions for this anywhere?

  2. #2
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,952
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,256
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Thanks Fernando, I get an error though when trying to build. I am trying to build an empty app with a single active object?




    > Configure project :app
    WARNING: The option 'android.useDeprecatedNdk' is deprecated.
    The current default is 'false'.
    It has been removed from the current version of the Android Gradle plugin.
    NdkCompile is no longer supported
    Checking the license for package Android SDK Platform-Tools in C:\Program Files\Android\Android Studio\jre\licenses
    Warning: License for package Android SDK Platform-Tools not accepted.
    Checking the license for package SDK Patch Applier v4 in C:\Program Files\Android\Android Studio\jre\licenses
    Warning: License for package SDK Patch Applier v4 not accepted.
    Checking the license for package Android Emulator in C:\Program Files\Android\Android Studio\jre\licenses
    Warning: License for package Android Emulator not accepted.
    Checking the license for package Android SDK Tools in C:\Program Files\Android\Android Studio\jre\licenses
    Warning: License for package Android SDK Tools not accepted.
    Checking the license for package Android SDK Build-Tools 29.0.2 in C:\Program Files\Android\Android Studio\jre\licenses
    Warning: License for package Android SDK Build-Tools 29.0.2 not accepted.
    Checking the license for package Android SDK Platform 29 in C:\Program Files\Android\Android Studio\jre\licenses
    Warning: License for package Android SDK Platform 29 not accepted.

    FAILURE: Build failed with an exception.

    * What went wrong:
    Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
    > Failed to install the following Android SDK packages as some licences have not been accepted.
    patcher;v4 SDK Patch Applier v4
    emulator Android Emulator
    platforms;android-29 Android SDK Platform 29
    tools Android SDK Tools
    build-tools;29.0.2 Android SDK Build-Tools 29.0.2
    platform-tools Android SDK Platform-Tools
    To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
    Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html

    Using Android SDK: C:\Program Files\Android\Android Studio\jre

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    * Get more help at https://help.gradle.org

    BUILD FAILED in 1s

  4. #4
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,118
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)
    This issue is referenced in the post Fernando talked about:

    + Gradle automatically downloads the libraries and build tools it needs, however it doesn't ask you for accepting licenses. If you get an error message that says "License for package XXXXX not accepted.", do this:

    1. open an explorer window and go to the Android SDK folder (usually C:\Users\YourName\AppData\Local\Android\Sdk)
    2. open the tools/bin sub-directory
    3. open a command prompt window in this directory and type "sdkmanager --licenses" (or sdkmanager --update for old versions of the SDK), this will allow you to review and accept the licenses of the downloaded files. You can also simply open the SDK Manager and update the build API/Tools, this may work.

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,256
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yves View Post
    This issue is referenced in the post Fernando talked about:
    I tried this also but I just get an error in the prompt window instead. When I try to open a command prompts I can only select something called PowerShell but I think it is the same thing. This is the errors I get when trying to enter the commands (also added a screenshot of it)

    PS C:\Users\VaragtP\AppData\Local\Android\Sdk\tools\b in> sdkmanager --licenses
    sdkmanager : The term 'sdkmanager' is not recognized as the name of a cmdlet, function, script file, or operable
    program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + sdkmanager --licenses
    + ~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (sdkmanager:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


    Suggestion [3,General]: The command sdkmanager was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\sdkmanager". See "get-help about_Command_Precedence" for more details.
    PS C:\Users\VaragtP\AppData\Local\Android\Sdk\tools\b in> sdkmanager --update
    sdkmanager : The term 'sdkmanager' is not recognized as the name of a cmdlet, function, script file, or operable
    program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + sdkmanager --update
    + ~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (sdkmanager:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


    Suggestion [3,General]: The command sdkmanager was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\sdkmanager". See "get-help about_Command_Precedence" for more details.
    PS C:\Users\VaragtP\AppData\Local\Android\Sdk\tools\b in>
    Images attachées Images attachées

  6. #6
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,118
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)
    Did you try to do what they say in this screenshot, i.e. type .\sdkmanager instead of sdkmanager.

    I don't know PowerShell, not sure what you can run with it. Otherwise just launch a normal command prompt window (search for cmd in the Windows find box in the taskbar).

  7. #7
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,256
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yves View Post
    Did you try to do what they say in this screenshot, i.e. type .\sdkmanager instead of sdkmanager.

    I don't know PowerShell, not sure what you can run with it. Otherwise just launch a normal command prompt window (search for cmd in the Windows find box in the taskbar).
    That worked and I accepted all the licences. However I still get another error (I think the same error) now when trying to build:


    > Configure project :app
    WARNING: The option 'android.useDeprecatedNdk' is deprecated.
    The current default is 'false'.
    It has been removed from the current version of the Android Gradle plugin.
    NdkCompile is no longer supported
    Checking the license for package Android SDK Platform-Tools in C:\Program Files\Android\Android Studio\jre\licenses
    Warning: License for package Android SDK Platform-Tools not accepted.
    Checking the license for package SDK Patch Applier v4 in C:\Program Files\Android\Android Studio\jre\licenses
    Warning: License for package SDK Patch Applier v4 not accepted.
    Checking the license for package Android Emulator in C:\Program Files\Android\Android Studio\jre\licenses
    Warning: License for package Android Emulator not accepted.
    Checking the license for package Android SDK Tools in C:\Program Files\Android\Android Studio\jre\licenses
    Warning: License for package Android SDK Tools not accepted.
    Checking the license for package Android SDK Build-Tools 29.0.2 in C:\Program Files\Android\Android Studio\jre\licenses
    Warning: License for package Android SDK Build-Tools 29.0.2 not accepted.
    Checking the license for package Android SDK Platform 29 in C:\Program Files\Android\Android Studio\jre\licenses
    Warning: License for package Android SDK Platform 29 not accepted.

    FAILURE: Build failed with an exception.

    * What went wrong:
    Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
    > Failed to install the following Android SDK packages as some licences have not been accepted.
    patcher;v4 SDK Patch Applier v4
    emulator Android Emulator
    platforms;android-29 Android SDK Platform 29
    tools Android SDK Tools
    build-tools;29.0.2 Android SDK Build-Tools 29.0.2
    platform-tools Android SDK Platform-Tools
    To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
    Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html

    Using Android SDK: C:\Program Files\Android\Android Studio\jre

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    * Get more help at https://help.gradle.org

    BUILD FAILED in 932ms




    I also tried to write the command in the regular command prompt but I just get this message now telling me repositories.cfg cant be loaded but all SDK packages are accepted:

    C:\Users\VaragtP\AppData\Local\Android\Sdk\tools\b in>.\sdkmanager --licenses
    Warning: File C:\Users\VaragtP\.android\repositories.cfg could not be loaded.
    All SDK package licenses accepted.======] 100% Computing updates...
    Images attachées Images attachées

  8. #8
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,256
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    This is how things look like in the Android Manager. Could the problem be that I need to install the API for 29 also? I tried to change the API to 31 in Fusion but got the same error.
    Images attachées Images attachées

  9. #9
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,118
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)
    Maybe try installing API's 29 and 30. Not sure if 31 is supported yet.

  10. #10
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,256
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Works now! Somehow I had managed to put in the path to the java folder for the sdk path in the general settings

Similar Threads

  1. Java Audio Errors on Building APK
    By RichC in forum Android Export Module 2.5
    Replies: 16
    Last Post: 15th August 2018, 03:36 PM
  2. Android Exporter - Trouble Building an Android Application
    By Appsareawesome in forum Android Export Module Version 2.0
    Replies: 1
    Last Post: 19th February 2014, 06:48 PM
  3. [Building Error] Android Dialogs & Android Lights
    By ProdigyX in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 20th March 2013, 10:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •