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 6991165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:27:32+00:00 2026-05-27T19:27:32+00:00

In my Android app, when I create a new emulator and try to write

  • 0

In my Android app, when I create a new emulator and try to write in webview for the first time, it’s not active. I can’t write in textfield and then the app crashes. If I reload the app all works OK.

Code:

String url = "http://api.vkontakte.ru/oauth/authorize?client_id=2731649&scope=wall,notify,docs&" +
            "redirect_uri=http://api.vkontakte.ru/blank.html&display=wap&response_type=token";
    WebViewClass wvClforVK = new WebViewClass();

In oncreate:

webview= (WebView) findViewById(R.id.vkWebView);
         webview.setWebViewClient(wvClforVK);

On buttonclick:

webview.loadUrl(url);
in wvClforVK
 @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
         view.loadUrl(url); 
            return true;
        } 
  • 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-05-27T19:27:33+00:00Added an answer on May 27, 2026 at 7:27 pm

    You must set the content view BEFORE attempting to use any components such as your R.id.vkWebView. If you use findViewById(...) before setting content view, it will return null.

    To set the content view call…

    setContentView(R.layout.main);
    

    …assuming your layout file is called main.xml but you don’t put the .xml part on it when using R.layout. Usually you will set the content view as early in an activity’s onCreate(...) method as possible. This is often done immediately after the call to super.onCreate(...);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Java and Android development and try to create a simple app
I must create android application for tablets, app will be shows new magazines and
I am trying to develop my first Android app through the ADT plugins for
I'm wondering if it is possible to create an Android app with only Java.
So here I have this first time app I'm working on. When I run
Hi I am new to android app development and have no idea of SQLite
I'm trying to create an Android app in Java (using Ubuntu 11.10 with the
I'm making an Android app where the user can download files from a FTP-server.
I released my first Android app two weeks ago (an MMO called Agent Syndicate)
I'm currently using Monodroid to develop an android app. I'm rather new to phone

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.