anoop
anoop

Reputation: 792

Error in PhoneGap program "Web page not available"

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.enter image description here

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

Answers (2)

Siarhei
Siarhei

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

adrien
adrien

Reputation: 4439

Simple Google search came to this :

phonegap doesn't work

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

Related Questions