Intellij does not open APK after installation

0

In my application, after installing, Intellij does not "command" to open the apk.

In my manifest the main Activity is already set up

<application 
...
    <activity
        android:name=".Activitys.Main"
        android:label="@string/title_activity_main"
        android:theme="@style/AppTheme.NoActionBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
...

Apparently Intellij is correct to build configuration

I have tried to change this option, manually choosing the activity .. but it did not work .. just install the APK, but it does not open .. I have to manually go there in the option to open ...

With this I have problem when debugging the class Application

Can anyone have an idea of what might be happening? I already rebooted Android and PC too ..

[Edited]

Today the following error occurred while trying to install:

Error while executing: am startservice meu.pacote/com.android.tools.fd.runtime.InstantRunService
Starting service: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=meu.pacote/com.android.tools.fd.runtime.InstantRunService }
Error: Not found; no service started.

With this information I disabled InstantRun, and app started to open normal, but anyway .. I would like to leave Instant Run enabled, if anyone has any idea how to resolve this ...

    
asked by anonymous 10.08.2017 / 16:02

1 answer

0

Check next to the Run button if you have the 'app' option selected as well. If not it will try to run where the selection in the 'Project' tab is

Edit does not seem to find the main class, open AndoridManifest place your cursor in the name of the main class ".Activityes.Main" and press Ctrl + B to navigate to it, if not find you declared the wrong package.

And another thing, package names begin with lowercase letters, and component names that extended from Android use the suffix of type in the class name: "MainActivity".

    
11.08.2017 / 22:11