How to create a WebView in Android Studio Tutorial (Kotlin 2020)

Поділитися
Вставка
  • Опубліковано 15 вер 2024

КОМЕНТАРІ • 72

  • @Tajgoldsofttj
    @Tajgoldsofttj 2 роки тому +16

    up to this point, everything is underlined in red in my code
    -----------------------------------
    Unresolved reference: wb_webView
    Variable expected
    Unresolved reference: wb_webView
    Unresolved reference: loadUrl
    Unresolved reference: settings
    Variable expected
    Unresolved reference: settings
    Variable expected

    • @davidapk323
      @davidapk323 Рік тому +1

      yes. i have the same problems
      @indetity

    • @m_2330
      @m_2330 6 місяців тому

      for anyone encountering this error now, add this inside the MainActivity class, but not inside any function: val wb_webView = findViewById(R.id.wb_webView)

    • @filipzboril1184
      @filipzboril1184 Місяць тому

      I know this is 2 years old but I thougt i should leave this here for future generations.
      Adding this line: 'val myWebView: WebView = findViewById(R.id.webview)'
      To your code "imports" the View from the xml file to the kotlin code, which should resolve the reference.
      Hope this helps and is the thing that didn't wokr

  • @Ngavy_jin
    @Ngavy_jin 3 роки тому +23

    "wb_webView" is not coming up automatically. would you help me out here?

    • @mertmelihaytemur4968
      @mertmelihaytemur4968 3 роки тому +10

      add id 'kotlin-android-extensions' in build gradle -> plugins{ }

    • @AdityaKumar-mh7rc
      @AdityaKumar-mh7rc 3 роки тому

      @@mertmelihaytemur4968 Where can I find build gradle?

    • @Coldcorn
      @Coldcorn 3 роки тому +1

      @Aditya Kumar Below all the project files > look for Gradle Scripts

    • @StoicBoyMario
      @StoicBoyMario 3 роки тому

      @@mertmelihaytemur4968 Thank you so much!This prevented me from making use of the tutorial!God bless ya!

    • @amou95
      @amou95 3 роки тому

      @@mertmelihaytemur4968 hi sorry for the pop up but how do I do that? Do I include in a script or is it something you enable in the settings? Im very new to android studio development.

  • @tjwatts100
    @tjwatts100 2 роки тому +2

    Mate: Really great tutorial - thanks for taking the time. I'm 54, been hacking on computers since 1979. Decided it's time to try android coding. Haven't got a clue, so your video was really useful. You can teach an old dog new tricks 😄 Now my simple web wrapper app works...

    • @Indently
      @Indently  2 роки тому +1

      Really happy to hear! This video is quite old, but my friend Philipp Lackner has been making incredibly up to date Android tutorials, so if you haven't seen him yet, I definitely recommend checking his channel out!

  • @arjunshinde7
    @arjunshinde7 3 роки тому +5

    wb_webView.webViewClient = WebViewClient()
    This line gets red underlined in android studio. When hovered it says unresolved reference: wb_webView and when hovered over webViewClient it says expected variable. I am using API 27 as target device. i have copied your code but not working and giving error. Any solution for this.

    • @ivanmleh6033
      @ivanmleh6033 3 роки тому +1

      do this
      val mWebView = findViewById(R.id.wb_webView) as WebView
      mWebView.webViewClient = WebViewClient() .....

    • @arjunshinde7
      @arjunshinde7 3 роки тому

      @@ivanmleh6033 val mWebView = findViewById(R.id.wb_webView)
      mWebView.webViewClient = WebViewClient()
      webViewClient is still have red underlined. Hovered over it then says unresolved reference: webViewClient. Do you want to rename the reference. What should I do.

    • @nousernamethx
      @nousernamethx 3 роки тому +6

      @@arjunshinde7 val mWebView = findViewById(R.id.wb_webView)
      mWebView.webViewClient = WebViewClient()
      This worked for me ^

    • @ajit1009
      @ajit1009 3 роки тому

      FYI
      import kotlinx.android.synthetic.main.activity_main.* add this to import and "wb_webView.webViewClient = WebViewClient()" will work as no need to create variable .

    • @internationalcentreforwate296
      @internationalcentreforwate296 2 роки тому +2

      @@ajit1009 When I copied your import line above, the text "kotlinx" was highlighted in red and a pop up statement said "unresolved reference: kotlinx". Therefore, could not import. Any reason why this is in red? Is there another solution? Thank you.

  • @Bragheto
    @Bragheto 3 роки тому +4

    This is SOOOOOOOO useful! Thaks a lot!

  • @aladuraagboola4599
    @aladuraagboola4599 2 роки тому +2

    Thanks. God bless! I needed this for clarification.

  • @Rafael-hk9pg
    @Rafael-hk9pg 3 роки тому +2

    How to disable the refresh from the webview? I am running into "too many requests coming from your IP" messages

  • @kesavguru415
    @kesavguru415 Рік тому +1

    Thanks for the video very useful 😀👍

  • @yotsusan_machi
    @yotsusan_machi 3 роки тому +2

    oh my gah thanks man very very usefull

  • @Tajgoldsofttj
    @Tajgoldsofttj 2 роки тому +1

    bro why don't working

  • @jasmanpreetsingh5076
    @jasmanpreetsingh5076 4 роки тому +2

    Short and simple 👌🏻

  • @i_g1200
    @i_g1200 2 роки тому +1

    Thanks it was very helpful ❤

  • @bekturmuratov7853
    @bekturmuratov7853 2 роки тому +1

    Hello everyone, how to make sure that when he clicks on a phone number, he opens a call to the number?

  • @deiv319x
    @deiv319x 2 роки тому +1

    Thank you so much man! Out of context question: are you Italian?

    • @Indently
      @Indently  2 роки тому

      Half Italian 🇮🇹

  • @bloos3rpent906
    @bloos3rpent906 3 роки тому +1

    mine is crashing when the cangoback feature is added

  • @Gelki1
    @Gelki1 2 роки тому +1

    guide in super speed... well... lucky we can paus. :D

  • @UtkalBanik
    @UtkalBanik 2 роки тому +1

    How to hide url when device is offline

  • @hariramnarayanan5157
    @hariramnarayanan5157 4 роки тому +2

    Thank you so so much for making this video

  • @nghgocc5403
    @nghgocc5403 3 роки тому +2

    thnx

  • @devgrp9
    @devgrp9 2 роки тому +1

    Have you got an email to we can contact you to quote on a simple webview app?

  • @DominicanGK
    @DominicanGK 4 роки тому +1

    so that the videos are put in full screen?

  • @ShivamVerma-dn3tk
    @ShivamVerma-dn3tk 4 роки тому +2

    Nice video

  • @ericgarcia1912
    @ericgarcia1912 2 роки тому +1

    Great 👍 tutorial, Can you please make one with buttons

  • @robstark4062
    @robstark4062 4 місяці тому

    This is really great, but how can we save cookies

  • @GameGarsel
    @GameGarsel 2 роки тому +1

    this url can't using http link ? must be https ?

    • @Indently
      @Indently  2 роки тому

      You should never use http in general

  • @apurbokumaranup3914
    @apurbokumaranup3914 3 роки тому +1

    how to call permission webview app

  • @leandrosistemavs1043
    @leandrosistemavs1043 4 роки тому +1

    message if there is no internet how is it added?

  • @Leeminduc
    @Leeminduc 3 роки тому +1

    Thank man !

  • @arpitgupta3151
    @arpitgupta3151 3 роки тому +1

    Hi I need a little help
    I'm loading a web page where you can upload a picture from gallery
    How can I access storage from web view to upload to the page?

    • @Indently
      @Indently  3 роки тому

      Isn't it automatic?

    • @arpitgupta3151
      @arpitgupta3151 3 роки тому

      @@Indently When I press the upload button of a website it doesn't open the file manager
      As far I've learned there is something file opening function in web view client
      Can you make a video about it?

    • @Indently
      @Indently  3 роки тому

      Hey there! Unfortunately we don't make Android videos anymore, please check out Philipp Lackner or Coding in Flow instead. Have a nice day!

  • @goodandperfect
    @goodandperfect Рік тому +1

    Great tut. Kindly add source code please

  • @lofistudio9652
    @lofistudio9652 4 роки тому +1

    Nice

  • @nik00747
    @nik00747 3 роки тому +1

    how to handle that onbackpressed in fragments?

    • @Indently
      @Indently  3 роки тому

      www.google.com/

    • @nik00747
      @nik00747 3 роки тому

      @@Indently wow thanx mam, should have done that before watching your video

    • @Indently
      @Indently  3 роки тому

      www.google.com/

  • @yoganandasaputra8356
    @yoganandasaputra8356 4 роки тому +1

    what emulator you use?

    • @Indently
      @Indently  4 роки тому

      I don't use an emulator, just my phone

  • @archanasadula9209
    @archanasadula9209 4 роки тому +1

    It is not clear, I am not able to see

  • @Karuni7
    @Karuni7 4 роки тому +3

    This shit is almost as tite as a slack line

  • @ProfHemant
    @ProfHemant 2 роки тому +1

    not useful.. not proper info

    • @Indently
      @Indently  2 роки тому +2

      Useful comment with proper info 💪

    • @UtkalBanik
      @UtkalBanik 2 роки тому +1

      Haha