user2412351
user2412351

Reputation: 139

Video Cannot Be Play, ERROR/MediaPlayerService(128)

Im developing android apps to play video on fragment. the code like below :

videoView.setVideoURI(Uri.parse(videoPath));                              
videoView.setMediaController(new MediaController(rootView.getContext())); 
videoView.requestFocus();                                                 
videoView.start();     

But when run in devide, the error :

ERROR/MediaPlayerService(128): Request requires android.permission.INTERNET

i already add internet permission in my manifest

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

how to solve this?

manifest file:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.example.APPS"
          android:versionCode="1"
          android:versionName="1.0">
    <uses-sdk android:minSdkVersion="14"/>
    <application android:label="@string/app_name" android:icon="@drawable/icon_APPS">
        <uses-permission android:name="android.permission.INTERNET" />
        <activity android:name= ".splash_APPS"
                  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="APPS" android:label="@string/app_name"/>
    </application>
</manifest>

Upvotes: 0

Views: 188

Answers (1)

Yogesh Patil
Yogesh Patil

Reputation: 888

Your have used uses-permission tag is inside the application tag. It is a direct sub tag of manifest tab. Refer here

Try this...

    <application android:label="@string/app_name" android:icon="@drawable/icon_APPS">
        <activity android:name= ".splash_APPS"
                  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="APPS" android:label="@string/app_name"/>
    </application> </manifest>

Hope this helps...

Upvotes: 1

Related Questions