Android app always crashing

后端 未结 3 697
故里飘歌
故里飘歌 2021-01-28 12:57

I\'m new at programming for android so i\'ve started to follow tutorials on the internet, very simple stuff but when I compiled it in order to run on the emulator it always says

相关标签:
3条回答
  • 2021-01-28 13:08

    Change your manifest like this;

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

    <uses-sdk android:minSdkVersion="8"
      android:targetSdkVersion="19" />
    
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MyActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
    
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    

    0 讨论(0)
  • 2021-01-28 13:21

    Use targetSdkVersion as 19.

    <uses-sdk
        android:minSdkVersion="15"
        android:targetSdkVersion="19" />
    

    There is a problem with API 20

    Reference

    Hope it helps.

    0 讨论(0)
  • 2021-01-28 13:21

    You will have to set the correct target and minsdkversion like this:

    <uses-sdk android:minSdkVersion="8"
          android:targetSdkVersion="19" />
    
    0 讨论(0)
提交回复
热议问题