Reputation: 792
package com.phonegap;
import org.apache.cordova.*;
import android.os.Bundle;
public class PhoneGapSampleActivity extends DroidGap {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.loadUrl("assets/www/index.html");
}
}
I use this code for PhoneGap application..
But it shows an error.
I added index.html file in assets/www folder. But it shows an error ... Anyone can help me??
Thanks in advance.
Upvotes: 2
Views: 1616
Reputation: 194
You forgot the file:///
. Keep in mind it's important to have the three slashes!
Also I think it should be android_asset and not asset.
In my app it is: "file:///android_asset/www/index.html"
Upvotes: 1
Reputation: 4439
Simple Google search came to this :
The solution was to rename phonegap.0.9.4.js and phonegap.0.9.4.jar to just phonegap.jar and phonegap.js.
Upvotes: 0