Re: [PhoneGap] Re: Application Error (android_asset/www/index.html) in App running on Android 2.1 and 2.2

13,918 views
Skip to first unread message

Gaurav dixit

unread,
Dec 12, 2011, 8:24:27 AM12/12/11
to phon...@googlegroups.com
Hello Friend , you have another way for this . i am giving piece of code which may be beneficial for you.

       public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.init();
        super.setIntegerProperty("splashscreen", R.drawable.splash);
        super.loadUrl("file:///android_asset/www/index.html", 1000);
    }

means  you finished your splash screen work in android activity.

thanks
Gaurav



On Fri, Dec 9, 2011 at 8:07 PM, Sam <dhavala...@gmail.com> wrote:
Atlast I got to solve this. This is happening because one of my files
in assets/www/ folder are more than 1MB in size and Android was trying
to compress them using aapt or so. I renamed my file (which is more
than 1MB in size) to a previously-compressed format (.jet) as
instructed in this link (http://ponystyle.com/blog/2010/03/26/dealing-
with-asset-compression-in-android-apps/
). Finally I got my app to run
on Android 2.1 and 2.2 also.

Hope the answer helps.

On Dec 9, 2:35 pm, Sam <dhavalasanj...@gmail.com> wrote:
> Does compiling this app in Eclipse for Mac differ from compiling it in
> Eclipse for Windows?
>
> I am currently working on Mac. There are no ads/external links, so I
> guess the internet connection is not a problem.
>
> On Dec 9, 11:53 am, Derrick <dfranc3...@gmail.com> wrote:
>
>
>
>
>
>
>
> > The issue is the ads. If you are getting this error it is because you
> > have no internet connection and your ad script is trying to connect to
> > a outside page. You can use a check for internet to make sure and then
> > let it try or not.
>
> > On Dec 8, 8:48 am, Sam <dhavalasanj...@gmail.com> wrote:
>
> > > Hi,
>
> > > I wrote a PhoneGap app and it runs fine on iOS. When it comes to
> > > Android, it runs fine on 2.3.3 and 2.3.6. But it shows Application
> > > Error (android_asset/www/index.html) and quits. The index.html is
> > > being used as a splash screen which has a setTimeout() function that
> > > redirects the page to another html page.
>
> > > Can anyone help me with this ASAP please?

--
You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en

For more info on PhoneGap or to download the code go to www.phonegap.com

Sam

unread,
Dec 8, 2011, 8:48:02 AM12/8/11
to phonegap

Sam

unread,
Dec 8, 2011, 8:50:02 AM12/8/11
to phonegap
Also, I tried Phonegap 1.2.0 as it claims the bug was fixed. I tried
almost everything that I can encounter on the web but to no avail.

Mike Rinow

unread,
Dec 8, 2011, 11:45:32 AM12/8/11
to phonegap
I am having the same issue, let me know if you find a resolution to
your problem. I think that when this error comes up it is in the
build itself, not in your code. Sometimes it happens and sometimes it
doesn't.

zb

unread,
Dec 8, 2011, 7:32:22 PM12/8/11
to phonegap
Hello,

In phonegap development multiple html files won't work unless you use
some javascript ajax or jquery or jquerymobile.com

What you should do is have page elements. in jquerymobile.com you
define a page with data-role="page" and id tag. All the div tag pages
are in one html file. Then you use javascript to switch between them.
Have a look at this:
http://jquerymobile.com/demos/1.0/docs/api/events.html

<div data-role="page" id="welcome">

<div data-role="content">
<img src="splash.jpg" />

</div>

</div>

<div data-role="page" id="aftersplash">

<div data-role="content">
Some content after splash

</div>

</div>

Derrick

unread,
Dec 9, 2011, 1:53:12 AM12/9/11
to phonegap
The issue is the ads. If you are getting this error it is because you
have no internet connection and your ad script is trying to connect to
a outside page. You can use a check for internet to make sure and then
let it try or not.

On Dec 8, 8:48 am, Sam <dhavalasanj...@gmail.com> wrote:

Sam

unread,
Dec 9, 2011, 4:35:41 AM12/9/11
to phonegap
Does compiling this app in Eclipse for Mac differ from compiling it in
Eclipse for Windows?

I am currently working on Mac. There are no ads/external links, so I
guess the internet connection is not a problem.

On Dec 9, 11:53 am, Derrick <dfranc3...@gmail.com> wrote:

Sam

unread,
Dec 9, 2011, 9:37:06 AM12/9/11
to phonegap
Atlast I got to solve this. This is happening because one of my files
in assets/www/ folder are more than 1MB in size and Android was trying
to compress them using aapt or so. I renamed my file (which is more
than 1MB in size) to a previously-compressed format (.jet) as
instructed in this link (http://ponystyle.com/blog/2010/03/26/dealing-
with-asset-compression-in-android-apps/). Finally I got my app to run
on Android 2.1 and 2.2 also.

Hope the answer helps.

On Dec 9, 2:35 pm, Sam <dhavalasanj...@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages