1

私はこれが本当に非常に初歩的な質問であることを知っていますが、ここに行きます. phonegap アプリにスプラッシュを追加しようとしていますが、ビルドできません。これがビルド出力です。(注:phonegapをサポートするnetbeansを使用しています)

error: cannot find symbol
    super.setIntegerProperty("splashscreen", R.drawable.splash);
  symbol:   variable splash
  location: class drawable
  1 error
  /home/ujjwal/CODE/codesvn/html5/nbproject/build.xml:330: The following error occurred while executing this line:
  /home/ujjwal/Install/adt-bundle-linux-x86_64-20130729/sdk/tools/ant/build.xml:712: The following error occurred while executing this line:
  /home/ujjwal/Install/adt-bundle-linux-x86_64-20130729/sdk/tools/ant/build.xml:726: Compile failed; see the compiler error output for details.

すべてのクラスパスとその他の詳細を設定するために netbeans に依存しているため、これが失敗する特定の理由はわかりません。何が間違っている可能性がありますか?不足しているライブラリを含める必要がありますか。

これが私のconfig.xmlのsplashScreenの行です

<gap:plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>

誰かが私を正しい方向に向けてください。前もって感謝します

編集:私の App.java からの行

public class App extends DroidGap
{
    @Override
    public void onCreate(Bundle savedInstanceState)
    {

        super.onCreate(savedInstanceState);
        super.setIntegerProperty("splashscreen", R.drawable.splash);
        super.loadUrl(Config.getStartUrl(), 10000);

    }
    @Override
    public void onBackPressed() {
        // Do Here what ever you want do on back press;
    }
}

構成.xml

<gap:splash gap:platform="android" height="480" src="res/screen/android/screen-hdpi-landscape.png" width="800"/>
<gap:splash gap:platform="android" height="800" src="res/screen/android/screen-hdpi-portrait.png" width="480"/>
<gap:splash gap:platform="android" height="200" src="res/screen/android/screen-ldpi-landscape.png" width="320"/>
<gap:splash gap:platform="android" height="320" src="res/screen/android/screen-ldpi-portrait.png" width="200"/>
<gap:splash gap:platform="android" height="320" src="res/screen/android/screen-mdpi-landscape.png" width="480"/>
<gap:splash gap:platform="android" height="480" src="res/screen/android/screen-mdpi-portrait.png" width="320"/>
<gap:splash gap:platform="android" height="720" src="res/screen/android/screen-xhdpi-landscape.png" width="1280"/>
<gap:splash gap:platform="android" height="1280" src="res/screen/android/screen-xhdpi-portrait.png" width="720"/>
4

2 に答える 2

0

super.setIntegerProperty前にする必要があることがわかりましたsuper.loadUrl。シーケンスを次のように変更します。

super.setIntegerProperty("splashscreen", R.drawable.splash)
super.loadUrl(Config.getStartUrl(), 10000);
于 2013-09-12T09:55:45.923 に答える