0

Every time I try to start up my application it crashes immediately because it receives this error.

Here is my Manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.simpleweatherandroid"
    android:versionCode="1"
    android:versionName="1.0" >

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

    <uses-permission android:name="INTERNET"/>
    <uses-permission android:name="ACCESS_NETWORK_STATE"/>


    <application
        android:exported = "true"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.simpleweatherandroid.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>
    </application>

</manifest>

I definitely have the permission in there and I have run out of solutions I can come up with/find on the Internet. I can't figure this out. Does anyone know what's wrong? I'm pretty new to this so it might be something basic.

Hamid Shatu
  • 9,664
  • 4
  • 30
  • 41

2 Answers2

4

Change it by from

    <uses-permission android:name="INTERNET"/>
    <uses-permission android:name="ACCESS_NETWORK_STATE"/>

to

   <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
   <uses-permission android:name="android.permission.INTERNET" />

Also you have to clean your project and rebuild it again. Also uninstall your app from device. And finally must insure that in your mobile device internet is available.

Piyush
  • 18,895
  • 5
  • 32
  • 63
0

Change this line in your maniefest file

 <uses-permission android:name="INTERNET"/>
<uses-permission android:name="ACCESS_NETWORK_STATE"/>

to

 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
 <uses-permission android:name="android.permission.INTERNET" />
rajshree
  • 790
  • 5
  • 19