Wednesday, 5 April 2017

Ionic Android App error, no Java files found which extend CordovaActivity


Gets the error "no Java files found which extend CordovaActivity" when building the solution or deploying to Android device.

Solution:

Navigate to platforms\android\src\com\YourAppName\MainActivity.java

You can find your app name from config.xml in side the <widget id="com.appName"> tag  

Open the MainActivity.java file and check if it extends from "CordovaActivity". If not change to extend from CordovaActivity as shown below.


public class MainActivity extends CordovaActivity
{
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        // Set by <content src="index.html" /> in config.xml
        loadUrl(launchUrl);
    }
}


Note: Using Ionic framework version 1 using Cordova

1 comment:

  1. bro i want collaboration and a backlink
    how to get adsense approval HELP plzzzz
    i have 32 post here url https://stepcoding.blogspot.com
    contact me mynkshrma60@gmail.com or comment on my llatesh post

    ReplyDelete