0

I have Just Upgraded My Android Studio and when i am running my old project it gives me error when launching the theme to device

16:45:30 Session 'theme': Error Launching activity

Could not identify launch activity: Default Activity not found
Error while Launching activity

here is my manifest

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"package="com.nitinvaid.theme.neoncolorsl" platformBuildVersionCode="23" platformBuildVersionName="6.0-2438415">
<meta-data android:name="org.cyanogenmod.theme.name" android:value="@string/theme_name"/>
<meta-data android:name="org.cyanogenmod.theme.author" android:value="@string/theme_author"/>
<application android:hasCode="false" android:icon="@drawable/ic_launcher" android:label="@string/theme_name">
</application>
</manifest>
nitin vaid
  • 71
  • 1
  • 4

2 Answers2

0

May be for some reasons, your default activity removed from your manifest, add it as the following:

    <activity
        android:name=".YourActivity"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
Mahmoud Ibrahim
  • 1,057
  • 11
  • 20
  • nope still the same i am building CM13 Theme So I dont think Activity matters bcoz i checked previously too there is no activity in my manifest and i am building over CM13 Theme Template and now when i switched back to old android studio its working perfectly again why i have this error on new android studio – nitin vaid Sep 03 '16 at 13:20
  • Try to update your android studio into "Beta" version not update to "Canary" or "Dev". – Mahmoud Ibrahim Sep 03 '16 at 13:24
  • i am using android studio 1.5.1 i have this problem few months back too when i upgraded my android studio to 2.0 then i reverted back to 1.5.1 and now today i thought give it a try but still its same in android studio 2.1.3 i guess – nitin vaid Sep 03 '16 at 13:33
  • Try to install this version 2.2 Beta http://tools.android.com/download/studio/builds/2-2-beta – Mahmoud Ibrahim Sep 03 '16 at 19:25
0

Okay SO it looks like If You are Building Themes For CM13 then the new android studio will always gives you error as the themes dont have activity in it so its just the error you should ignore it or what you can do is

Just change the run configuration of android studio for a theme app. Instead of default activity, change it to no activity.
nitin vaid
  • 71
  • 1
  • 4