2013-12-11 50 views
1

我正在嘗試生成一個asdoc。該項目是兩個班。一類延伸View,另一類是自定義Event類。真的很簡單。在我的生活中,我無法讓asdoc正確生成。我已經嘗試了很多不同的命令,我忘記了我已經嘗試過但沒有。爲什麼asdoc不會生成?

我每次編譯,我得到以下的輸出:

/Users/jjanusch/dev/workspaces/AIR/library/src/com/vuria/ui/views/PanelViewBase.as(41): col: 37 Error: The definition of base class View was not found. 

    public class PanelViewBase extends View 
            ^

/Users/jjanusch/dev/workspaces/AIR/library/src/com/vuria/ui/views/PanelViewBase.as(204): col: 31 Error: Method marked override must override another method. 

     override protected function createChildren():void { 
            ^

/Users/jjanusch/dev/workspaces/AIR/library/src/com/vuria/ui/views/PanelViewBase.as(246): col: 32 Error: Method marked override must override another method. 

     override public function set navigationContent(value:Array):void { 
            ^

/Users/jjanusch/dev/workspaces/AIR/library/src/com/vuria/ui/views/PanelViewBase.as(262): col: 32 Error: Method marked override must override another method. 

     override public function set actionContent(value:Array):void { 
            ^

/Users/jjanusch/dev/workspaces/AIR/library/src/com/vuria/ui/views/PanelViewBase.as(279): col: 31 Error: Method marked override must override another method. 

     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { 
            ^

這裏是bash腳本我使用

#!/bin/bash 
docSource="/Users/jjanusch/dev/workspaces/AIR/library/src" 
docOut="/Users/jjanusch/dev/workspaces/AIR/library/documentation" 
libraryPath="/Applications/Adobe Flash Builder 4.7/sdks/4.11 AIR 3.9/frameworks/libs" 
packageDescriptions="/Users/jjanusch/dev/workspaces/AIR/library/asdocs-package-descriptions.xml" 

"$asdoc" \ 
    -doc-sources "$docSource" \ 
    -output "$docOut" \ 
    -lenient \ 
    -compiler.library-path "$libraryPath" \ 
    -package-description-file "$packageDescriptions" \ 
    -keep-xml=true \ 
    -skip-xsl=true 

有很多參與PanelViewBase類Flex類的,但唯一的移動組件是View。我一直無法找到任何類似的問題,無法記錄移動課程。有沒有人有任何想法,爲什麼這不起作用?我也試過手動包括每個SWC作爲庫

編輯:值得關注的是,這是Flex的4.11和3.9 AIR。此外,格蘭特斯金納的Asdocr應用程序也會因相同的錯誤而失敗。

下面是從該類進口的好,只是良好的措施:

import com.vuria.events.ViewEvent; 

import flash.events.MouseEvent; 

import mx.core.UIComponent; 
import mx.graphics.SolidColor; 

import spark.components.Button; 
import spark.components.Group; 
import spark.components.View; 
import spark.primitives.Rect; 
import spark.primitives.RectangularDropShadow; 
+0

看起來有編譯代碼的一個問題 - 你嘗試加入的Flex SDK作爲源/ lib目錄路徑之一?自從我必須這樣做以來已經過了很多年,所以我沒有語法。嘗試在簡單的文件上運行asdoc,該文件不會擴展任何內容以查看是否出現相同的問題 – divillysausages

+0

@divillysausages我試過了。目前,我已將它設置爲'-compiler.library-path'選項,但我也嘗試了從'-library-path'到'-source-path'到'-doc-sources'的所有內容。它確實在一個簡單的項目上工作,但我無法使它與任何與移動sdk相關的任何工作 –

+0

嘗試在裸文件上運行它,所以至少我們知道這是否是問題 – divillysausages

回答

1

我試圖用的asdoc產生八哥文檔,沒有快樂,並遇到了這個問題了。

我在調用requestContext3D()時調用"Incorrect number of arguments"(即基本Flash,就像asdoc沒有使用正確的Flex/AIR版本來生成)。

http://help.adobe.com/en_US/flex/using/WSd0ded3821e0d52fe1e63e3d11c2f44bc36-7ffa.html和鏈接http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7a92.html,有屬性更好的解釋。

什麼工作對我來說(或者/或):

  • 添加-strict=false
  • 指定目標的球員,而後者將在其鏈接對適當的playerglobal.swc:-target-player=12.0

真正幫助我的是傾銷默認配置,所以我可以看到asdoc的所有默認值。您可以通過這樣做:

asdoc -dump-config config.xml 

通過這個文件看,我發現:

<target-player>11.1</target-player> 

所以加入的,因此我的錯誤就被鏈接爲Flash Player 11.1,該requestContext3D的第二個參數之前, 。

在你的情況,我也看到,默認框架設置爲halo,不spark,因此改變它可能會幫助

0

添加編譯器ARG +configname=airmobile和移動主題SWC添加到庫路徑。 -library-path+=${flexlib}/themes/Mobile/mobile.swc