How to Convert a Website into Android Application using Android Studio

In this tutorial we will learn How to Convert a Website into Android Application using Android Studio

So lets create a project.

Step 1 – Create new Android project.

Provide Activity name as EasyOnlineConverter

Step 2 – Add an webView to your activity as shown in the picture below.

Convert website to android app Design


<RelativeLayout xmlns:android=""
    xmlns:tools="" android:layout_width="match_parent"

        android:layout_alignParentEnd="true" />


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
    package="com.example.programmingknowledge.easyonlineconverter" >
    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
        android:theme="@style/AppTheme" >
            android:label="@string/app_name" >
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />


package com.example.programmingknowledge.easyonlineconverter;

import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends ActionBarActivity {
    private WebView myWebView;
    protected void onCreate(Bundle savedInstanceState) {
        myWebView = (WebView)findViewById(;
        WebSettings webSettings = myWebView.getSettings();
        myWebView.setWebViewClient(new WebViewClient());

    public void onBackPressed() {
        if(myWebView.canGoBack()) {
        } else {

    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(, menu);
        return true;

    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == {
            return true;

        return super.onOptionsItemSelected(item);


<menu xmlns:android=""
    xmlns:tools="" tools:context=".MainActivity">
    <item android:id="@+id/action_settings" android:title="@string/action_settings"
        android:orderInCategory="100" app:showAsAction="never" />


Now run your android app, and you will see the following result

Convert website to android app
Click the button below to Download Source code

Download Source Code

Video Instructions

Partner Sites


  1. Thank you. It was very helpful. how can we view In Desktop view from the android app.. now it is automatically changed to mobile version when we access the URL from app

  2. These Errors Took Place While Creating APK :

    Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:assembleDebug]
    Error:(4, 37) error: package does not exist
    Error:(5, 37) error: package does not exist
    Error:(42, 36) error: cannot find symbol variable menu
    Error:(54, 23) error: cannot find symbol variable action_settings
    Error:Execution failed for task ‘:app:compileDebugJavaWithJavac’.
    > Compilation failed; see the compiler error output for details.
    Information:BUILD FAILED
    Information:Total time: 39.347 secs
    Information:5 errors
    Information:0 warnings
    Information:See complete output in console

  3. Error:Failed to capture snapshot of output files for task ‘transformClassesWithDexForDebug’ property ‘streamOutputFolder’ during up-to-date check.
    > Failed to create MD5 hash for file ‘C:UsersAdminAndroidStudioProjectsEasyOnlineConverterappbuildintermediatestransformsdexdebugfolders10005slice_8classes.dex’.

    What type of this issue? How to resolve?

  4. many issues mostly appcompact library issue. Could you start wiith install, SDK to be installed & library dependencies ????

  5. hi thank you for your guide it was really helpful.
    I have a question and I be glade if you can help me.
    I convert a website that have a login screen how can I auto fill this fields and submit ?

  6. i just created an app as told to convert web to app. and created my first ever APK file and run in my phone.
    Only problem till now I found out that is when i click shopping cart in Website it says “the item being added to your shopping cart. However, in the app it does not show that popup though it adds the item in my shopping cart.
    What should i do? What changes I need to make in my App.
    Also I would like to change the APP Icon that is should show the Icon I want for my APP in the mobile. What do i need to do to change that icon?

  7. Is it possible to update the android app. if it is possible, how can it be done since it was a website that was converted into an apk file. thanks

  8. The version of Android Studio I downloaded appears to be an updated one, and a number of things are different. When I attempted to paste the code in the appropriate sections, it does not run the app, and gives errors at different points. Is there an updated version of the instructions?

Leave a Reply

Your email address will not be published.