ant debug, and sdk.dir

前端 未结 2 804
自闭症患者
自闭症患者 2021-02-08 22:34

I have a problem to generate the Android APK file.

When I run ant debug compilation work fine, but when I run ant debug

I have followin

相关标签:
2条回答
  • 2021-02-08 23:23

    Your project should have a local.properties file with an sdk.dir line that points to where your Android SDK is installed:

    # This file is automatically generated by Android Tools.
    # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
    #
    # This file must *NOT* be checked into Version Control Systems,
    # as it contains information specific to your local configuration.
    
    # location of the SDK. This is only used by Ant
    # For customization when using a Version Control System, please read the
    # header note.
    sdk.dir=/opt/android-sdk-linux_x86
    

    To create this file if it does not exist, run android update project -p ... where the ... is the path to your project.

    0 讨论(0)
  • 2021-02-08 23:26

    i had the same problem, i resolve the issue using a -Dvar or VM argument.

    ant debug -Dsdk.dir=$SDK_ROOT
    

    where $SDK_ROOT is android SDK path

    0 讨论(0)
提交回复
热议问题