Build error referencing build.xml and proguard file: “null returned: 1”

后端 未结 7 787
梦如初夏
梦如初夏 2021-01-02 08:34

While building my PhoneGap app (with the Facebook SDK plugin installed), I encountered this error:

BUILD FAILED C:\\adt-bundle-windows-x86_64-201305

相关标签:
7条回答
  • 2021-01-02 09:37

    In order to determine if the problem comes from your development environment or from a mistake in the project i recommend everybody to try to create a new project from the cordova CLI.

    • Open terminal
    • Type cordova create foo; cd foo;
    • Type cordova platform add android
    • Type cordova build

    Does it works? So the problem is on your project configuration. This was my mistake: In order to add icons to the application I've create a folder called android inside `foo/plataforms/android/res/{android/icon*.png}

    The correct way to add icons is to create the folder res in root of the project foo/{res/android/icon*.png}

    And then, add this files into the configuration file as follows:

    <platform name="android">
                  <icon src="res/android/icon@ldpi.png" density="ldpi" />
                  <icon src="res/android/icon@mdpi.png" density="mdpi" />
                  <icon src="res/android/icon@hdpi.png" density="hdpi" />
                  <icon src="res/android/icon@xhdpi.png" density="xhdpi" />
         </platform>
    
    0 讨论(0)
提交回复
热议问题