Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error type 3 - Activity class does not exist

Tags:

android

webrtc

I'm trying to run webRTC application but the error below returned:

Launching application: com.onlinevoicecallapp/com.onlinevoicecallapp.MainActivity.

DEVICE SHELL COMMAND: am start -n "com.onlinevoicecallapp/com.onlinevoicecallapp.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.onlinevoicecallapp/.MainActivity }

Error type 3 Error: Activity class {com.onlinevoicecallapp/com.onlinevoicecallapp.MainActivity} does not exist.

When I searched for it I found many solutions but none of them works in my case, please advice!

Below is my AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>

<!-- WebRTC Dependencies -->
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature
    android:glEsVersion="0x00020000"
    android:required="true" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

<!-- PubNub Dependencies -->
<!--<uses-permission android:name="android.permission.INTERNET" />-->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="your.package.name.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="your.package.name.permission.C2D_MESSAGE" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_pubrtc"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.onlinevoicecallapp.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="com.onlinevoicecallapp.VideoChatActivity"
        android:label="@string/title_activity_video_chat"
        android:parentActivityName="com.onlinevoicecallapp.MainActivity"
        android:windowSoftInputMode="stateHidden"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="com.onlinevoicecallapp.MainActivity" />
    </activity>
    <activity
        android:name="com.onlinevoicecallapp.IncomingCallActivity"
        android:label="@string/title_activity_incoming_call">
    </activity>
    <activity
        android:name="com.onlinevoicecallapp.LoginActivity"
        android:label="@string/title_activity_login" >
    </activity>
</application>

like image 385
L.M.O Avatar asked Jan 28 '17 11:01

L.M.O


1 Answers

I ran into this after manually uninstalling an old debug build. The app somehow got into a strange state where it was still installed, but "installed for another user". I had tried doing a clean build with no luck. This finally fixed it for me:

  1. Go into the application list and find the app. For me it was "installed for other users".
  2. Select "uninstall for all users" from the top-right menu.

After doing this I was able to deploy debug builds to the phone normally.

like image 103
Jeff Heidel Avatar answered Sep 23 '22 00:09

Jeff Heidel