Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7736339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:42:39+00:00 2026-06-01T07:42:39+00:00

I’m trying to get the browser function in my Android application to work but

  • 0

I’m trying to get the browser function in my Android application to work but the application crashes upon load. Here’s the code when the new activity is loaded:

@Override
public void onCreate(Bundle savedInstanceState) {
    WebView webview = new WebView(this);
    setContentView(webview);

    webview.loadUrl("http://erik-edgren.nu/weather");
    getWindow().requestFeature(Window.FEATURE_PROGRESS);

    WebSettings webSettings = webview.getSettings();
    webSettings.setJavaScriptEnabled(true);
}

And here is the LogCat:

04-05 13:51:20.224: D/dalvikvm(742): GC freed 2673 objects / 169288 bytes in 107ms
04-05 13:51:20.354: D/AndroidRuntime(742): Shutting down VM
04-05 13:51:20.354: W/dalvikvm(742): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
04-05 13:51:20.364: E/AndroidRuntime(742): Uncaught handler: thread main exiting due to uncaught exception
04-05 13:51:20.373: E/AndroidRuntime(742): java.lang.RuntimeException: Unable to start activity ComponentInfo{weather.right.now/weather.right.Browser}: android.util.AndroidRuntimeException: requestFeature() must be called before adding content
04-05 13:51:20.373: E/AndroidRuntime(742):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
04-05 13:51:20.373: E/AndroidRuntime(742):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
04-05 13:51:20.373: E/AndroidRuntime(742):  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
04-05 13:51:20.373: E/AndroidRuntime(742):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
04-05 13:51:20.373: E/AndroidRuntime(742):  at android.os.Handler.dispatchMessage(Handler.java:99)
04-05 13:51:20.373: E/AndroidRuntime(742):  at android.os.Looper.loop(Looper.java:123)
04-05 13:51:20.373: E/AndroidRuntime(742):  at android.app.ActivityThread.main(ActivityThread.java:4363)
04-05 13:51:20.373: E/AndroidRuntime(742):  at java.lang.reflect.Method.invokeNative(Native Method)
04-05 13:51:20.373: E/AndroidRuntime(742):  at java.lang.reflect.Method.invoke(Method.java:521)
04-05 13:51:20.373: E/AndroidRuntime(742):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-05 13:51:20.373: E/AndroidRuntime(742):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-05 13:51:20.373: E/AndroidRuntime(742):  at dalvik.system.NativeStart.main(Native Method)
04-05 13:51:20.373: E/AndroidRuntime(742): Caused by: android.util.AndroidRuntimeException: requestFeature() must be called before adding content
04-05 13:51:20.373: E/AndroidRuntime(742):  at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:172)
04-05 13:51:20.373: E/AndroidRuntime(742):  at weather.right.Browser.onCreate(Browser.java:23)
04-05 13:51:20.373: E/AndroidRuntime(742):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-05 13:51:20.373: E/AndroidRuntime(742):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
04-05 13:51:20.373: E/AndroidRuntime(742):  ... 11 more
04-05 13:51:20.404: I/dalvikvm(742): threadid=7: reacting to signal 3
04-05 13:51:20.484: I/dalvikvm(742): Wrote stack trace to '/data/anr/traces.txt'

How can I fix this problem?

Thanks in advance.

EDIT: The new LogCat

04-05 14:00:40.893: D/dalvikvm(783): GC freed 2724 objects / 171288 bytes in 136ms
04-05 14:00:41.044: D/AndroidRuntime(783): Shutting down VM
04-05 14:00:41.064: W/dalvikvm(783): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
04-05 14:00:41.064: E/AndroidRuntime(783): Uncaught handler: thread main exiting due to uncaught exception
04-05 14:00:41.074: E/AndroidRuntime(783): android.app.SuperNotCalledException: Activity {weather.right.now/weather.right.Browser} did not call through to super.onCreate()
04-05 14:00:41.074: E/AndroidRuntime(783):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2461)
04-05 14:00:41.074: E/AndroidRuntime(783):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
04-05 14:00:41.074: E/AndroidRuntime(783):  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
04-05 14:00:41.074: E/AndroidRuntime(783):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
04-05 14:00:41.074: E/AndroidRuntime(783):  at android.os.Handler.dispatchMessage(Handler.java:99)
04-05 14:00:41.074: E/AndroidRuntime(783):  at android.os.Looper.loop(Looper.java:123)
04-05 14:00:41.074: E/AndroidRuntime(783):  at android.app.ActivityThread.main(ActivityThread.java:4363)
04-05 14:00:41.074: E/AndroidRuntime(783):  at java.lang.reflect.Method.invokeNative(Native Method)
04-05 14:00:41.074: E/AndroidRuntime(783):  at java.lang.reflect.Method.invoke(Method.java:521)
04-05 14:00:41.074: E/AndroidRuntime(783):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-05 14:00:41.074: E/AndroidRuntime(783):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-05 14:00:41.074: E/AndroidRuntime(783):  at dalvik.system.NativeStart.main(Native Method)
04-05 14:00:41.094: I/dalvikvm(783): threadid=7: reacting to signal 3
04-05 14:00:41.124: I/dalvikvm(783): Wrote stack trace to '/data/anr/traces.txt'
04-05 14:00:43.176: I/Process(783): Sending signal. PID: 783 SIG: 9
04-05 14:00:43.994: D/LocationManager(798): Constructor: service = android.location.ILocationManager$Stub$Proxy@44e95780
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:42:39+00:00Added an answer on June 1, 2026 at 7:42 am

    Try this, And let me know what happen

    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    
    getWindow().requestFeature(Window.FEATURE_PROGRESS);
        WebView webview = new WebView(this);
        WebSettings webSettings = webview.getSettings();
        webSettings.setJavaScriptEnabled(true);
        setContentView(webview);
    
        webview.loadUrl("http://erik-edgren.nu/weather");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want to construct a data frame in an Rcpp function, but when I
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to render a haml file in a javascript response like so:
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.