Android App says "Can't Play this video" when provided with link - android

I developed a small android app to which a link is provided and it just need to play that video.
But playback says "Can't play this video".
Can anyone help me with this.?
Main Activity Code:
public class MainActivity extends AppCompatActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final VideoView ramVV= (VideoView)findViewById(R.id.ramVV);
ramVV.setVideoPath("https://www.thenewboston.com/forum/project_files/006_testVideo.mp4");
ramVV.start();
}
}
logcat shows the following:
07-18 22:24:19.925 17364-17364/com.example.ram.videoplayer D/﹕ HostConnection::get() New Host Connection established 0xb3eb3e80, tid 17364
07-18 22:24:20.015 17364-17364/com.example.ram.videoplayer D/Atlas﹕ Validating map...
07-18 22:24:20.059 17364-17379/com.example.ram.videoplayer D/﹕ HostConnection::get() New Host Connection established 0xb3eb3fd0, tid 17379
07-18 22:24:20.076 17364-17379/com.example.ram.videoplayer I/OpenGLRenderer﹕ Initialized EGL, version 1.4
07-18 22:24:20.110 17364-17379/com.example.ram.videoplayer D/OpenGLRenderer﹕ Enabling debug mode 0
07-18 22:24:20.117 17364-17379/com.example.ram.videoplayer W/EGL_emulation﹕ eglSurfaceAttrib not implemented
07-18 22:24:20.117 17364-17379/com.example.ram.videoplayer W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xb3f1ec20, error=EGL_SUCCESS
07-18 22:24:20.167 17364-17364/com.example.ram.videoplayer D/MediaPlayer﹕ Couldn't open file on client side, trying server side
07-18 22:24:50.612 17364-17378/com.example.ram.videoplayer E/MediaPlayer﹕ error (1, -2147483648)
07-18 22:24:50.612 17364-17364/com.example.ram.videoplayer E/MediaPlayer﹕ Error (1,-2147483648)
07-18 22:24:50.612 17364-17364/com.example.ram.videoplayer D/VideoView﹕ Error: 1,-2147483648
07-18 22:24:50.703 17364-17379/com.example.ram.videoplayer W/EGL_emulation﹕ eglSurfaceAttrib not implemented
07-18 22:24:50.703 17364-17379/com.example.ram.videoplayer W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xb3feb960, error=EGL_SUCCESS
07-18 22:24:53.600 17364-17379/com.example.ram.videoplayer D/OpenGLRenderer﹕ endAllStagingAnimators on 0xa512fd80 (RippleDrawable) with handle 0xa51358f0
And I have also added permission in Manifest file.

Related

Strange FirebaseUI authentication (with Email): 1st log-in failed while 2nd log-in succeeded

I was using FirebaseUI authentication for the log-in process. Here I got a very strange problem:
When I signed in with email, the functions that "let me input my email", "check if the email account has already exists", and "let me input my passwords" were all fine, but after I sent the passwords, I could not log-in and the FirebaseUI auth activity started over again. HOWEVER, if I try signing in with email AGAIN, I successfully signed in in my second try.
I have tested it many times, and always got the same results. Every 1st time had failed, while every 2nd time had succeeded. No idea why this had happened. Can someone help? Thank you!
Here is my logcat:
1st time login (failed)
02-09 21:39:45.599 20008-3407/com.einsambr.bridge_1_0 V/FA: Recording user engagement, ms: 66377
02-09 21:39:45.600 20008-3407/com.einsambr.bridge_1_0 V/FA: Using measurement service
02-09 21:39:45.600 20008-3407/com.einsambr.bridge_1_0 V/FA: Connecting to remote service
02-09 21:39:45.605 20008-3407/com.einsambr.bridge_1_0 V/FA: Activity paused, time: 24483951
02-09 21:39:45.610 20008-20008/com.einsambr.bridge_1_0 V/FA: onActivityCreated
02-09 21:39:45.612 20008-3407/com.einsambr.bridge_1_0 D/FA: Logging event (FE): _e, Bundle[{_o=auto, _et=66377, _sc=AuthMethodPickerActivity, _si=-452943598100446909}]
02-09 21:39:45.634 20008-20008/com.einsambr.bridge_1_0 D/AutoManageHelper: starting AutoManage for client 3 false false
02-09 21:39:45.645 20008-20008/com.einsambr.bridge_1_0 D/AutoManageHelper: onStart true {3=com.google.android.gms.internal.zzzt$zza#eca98fe}
02-09 21:39:45.680 20008-3407/com.einsambr.bridge_1_0 V/FA: Using measurement service
02-09 21:39:45.680 20008-3407/com.einsambr.bridge_1_0 V/FA: Connection attempt already in progress
02-09 21:39:45.681 20008-3407/com.einsambr.bridge_1_0 V/FA: Using measurement service
02-09 21:39:45.681 20008-3407/com.einsambr.bridge_1_0 V/FA: Connection attempt already in progress
02-09 21:39:45.682 20008-3407/com.einsambr.bridge_1_0 V/FA: Activity resumed, time: 24484001
02-09 21:39:45.719 20008-20068/com.einsambr.bridge_1_0 E/EGL_emulation: tid 20068: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
02-09 21:39:45.719 20008-20068/com.einsambr.bridge_1_0 W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x986a78e0, error=EGL_BAD_MATCH
02-09 21:39:45.807 20008-3407/com.einsambr.bridge_1_0 V/FA: Screen exposed for less than 1000 ms. Event not sent. time: 160
02-09 21:39:45.807 20008-3407/com.einsambr.bridge_1_0 V/FA: Using measurement service
02-09 21:39:45.807 20008-3407/com.einsambr.bridge_1_0 V/FA: Connection attempt already in progress
02-09 21:39:45.808 20008-3407/com.einsambr.bridge_1_0 V/FA: Activity paused, time: 24484161
02-09 21:39:46.158 20008-3407/com.einsambr.bridge_1_0 D/FA: Connected to remote service
02-09 21:39:46.158 20008-3407/com.einsambr.bridge_1_0 V/FA: Processing queued up service tasks: 4
02-09 21:39:46.441 20008-20068/com.einsambr.bridge_1_0 E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa1b427e0
02-09 21:39:46.475 20008-3407/com.einsambr.bridge_1_0 V/FA: Activity resumed, time: 24484824
02-09 21:39:51.477 20008-3407/com.einsambr.bridge_1_0 V/FA: Inactivity, disconnecting from the service
02-09 21:40:00.510 20008-20042/com.einsambr.bridge_1_0 W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
02-09 21:40:00.513 20008-20042/com.einsambr.bridge_1_0 W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
02-09 21:40:00.557 20008-20068/com.einsambr.bridge_1_0 E/EGL_emulation: tid 20068: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
02-09 21:40:00.557 20008-20068/com.einsambr.bridge_1_0 W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x97931fc0, error=EGL_BAD_MATCH
2nd time login (succeeded)
02-09 21:40:06.428 20008-20068/com.einsambr.bridge_1_0 E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa1b435e0
02-09 21:40:06.454 20008-3407/com.einsambr.bridge_1_0 V/FA: Recording user engagement, ms: 19984
02-09 21:40:06.455 20008-3407/com.einsambr.bridge_1_0 V/FA: Using measurement service
02-09 21:40:06.455 20008-3407/com.einsambr.bridge_1_0 V/FA: Connecting to remote service
02-09 21:40:06.459 20008-3407/com.einsambr.bridge_1_0 D/FA: Logging event (FE): _e, Bundle[{_o=auto, _et=19984, _sc=RegisterEmailActivity, _si=-452943598100446908}]
02-09 21:40:06.471 20008-20008/com.einsambr.bridge_1_0 V/FA: onActivityCreated
02-09 21:40:06.516 20008-3407/com.einsambr.bridge_1_0 V/FA: Using measurement service
02-09 21:40:06.516 20008-3407/com.einsambr.bridge_1_0 V/FA: Connection attempt already in progress
02-09 21:40:06.516 20008-3407/com.einsambr.bridge_1_0 V/FA: Activity paused, time: 24504812
02-09 21:40:06.521 20008-3407/com.einsambr.bridge_1_0 V/FA: Using measurement service
02-09 21:40:06.521 20008-3407/com.einsambr.bridge_1_0 V/FA: Connection attempt already in progress
02-09 21:40:06.521 20008-3407/com.einsambr.bridge_1_0 V/FA: Activity resumed, time: 24504840
02-09 21:40:06.521 20008-3407/com.einsambr.bridge_1_0 D/FA: Connected to remote service
02-09 21:40:06.521 20008-3407/com.einsambr.bridge_1_0 V/FA: Processing queued up service tasks: 3
02-09 21:40:06.549 20008-20068/com.einsambr.bridge_1_0 E/EGL_emulation: tid 20068: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
02-09 21:40:06.549 20008-20068/com.einsambr.bridge_1_0 W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x98695e00, error=EGL_BAD_MATCH
02-09 21:40:06.734 20008-20068/com.einsambr.bridge_1_0 E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa1b43880
02-09 21:40:10.679 20008-20042/com.einsambr.bridge_1_0 W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
02-09 21:40:11.579 20008-3407/com.einsambr.bridge_1_0 V/FA: Inactivity, disconnecting from the service
02-09 21:40:12.030 20008-20042/com.einsambr.bridge_1_0 W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
02-09 21:40:12.033 20008-20042/com.einsambr.bridge_1_0 W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
02-09 21:40:12.066 20008-20068/com.einsambr.bridge_1_0 E/EGL_emulation: tid 20068: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
02-09 21:40:12.066 20008-20068/com.einsambr.bridge_1_0 W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x986a59a0, error=EGL_BAD_MATCH
02-09 21:40:12.172 20008-20014/com.einsambr.bridge_1_0 W/art: Suspending all threads took: 18.413ms
02-09 21:40:13.166 20008-20020/com.einsambr.bridge_1_0 D/FirebaseAuth: Notifying listeners about user ( yG39yzzakVMtUqIb2ovDysSG8sj2 ).
02-09 21:40:13.184 20008-20008/com.einsambr.bridge_1_0 D/FirebaseApp: Notifying auth state listeners.
02-09 21:40:13.185 20008-20008/com.einsambr.bridge_1_0 D/FirebaseApp: Notified 1 auth state listeners.
02-09 21:40:13.185 20008-20008/com.einsambr.bridge_1_0 D/AutoManageHelper: starting AutoManage for client 2 false false
02-09 21:40:13.206 20008-20008/com.einsambr.bridge_1_0 D/AutoManageHelper: onStart true {2=com.google.android.gms.internal.zzzt$zza#974694}
02-09 21:40:13.291 20008-20008/com.einsambr.bridge_1_0 W/SaveSmartLock: No eligible accounts can be found
02-09 21:40:13.317 20008-3407/com.einsambr.bridge_1_0 V/FA: Recording user engagement, ms: 6831
02-09 21:40:13.317 20008-3407/com.einsambr.bridge_1_0 V/FA: Using measurement service
02-09 21:40:13.317 20008-3407/com.einsambr.bridge_1_0 V/FA: Connecting to remote service
02-09 21:40:13.322 20008-3407/com.einsambr.bridge_1_0 V/FA: Activity paused, time: 24511670
02-09 21:40:13.325 20008-3407/com.einsambr.bridge_1_0 D/FA: Logging event (FE): _e, Bundle[{_o=auto, _et=6831, _sc=WelcomeBackPasswordPrompt, _si=-452943598100446907}]
02-09 21:40:13.398 20008-3407/com.einsambr.bridge_1_0 V/FA: Using measurement service
02-09 21:40:13.398 20008-3407/com.einsambr.bridge_1_0 V/FA: Connection attempt already in progress
02-09 21:40:13.467 20008-3407/com.einsambr.bridge_1_0 D/FA: Connected to remote service
02-09 21:40:13.467 20008-3407/com.einsambr.bridge_1_0 V/FA: Processing queued up service tasks: 2
02-09 21:40:13.774 20008-20008/com.einsambr.bridge_1_0 D/AutoManageHelper: onStart true {1=com.google.android.gms.internal.zzzt$zza#1d27f6}
02-09 21:40:13.823 20008-20068/com.einsambr.bridge_1_0 E/EGL_emulation: tid 20068: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
02-09 21:40:13.823 20008-20068/com.einsambr.bridge_1_0 W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa047e8c0, error=EGL_BAD_MATCH
02-09 21:40:13.901 20008-20068/com.einsambr.bridge_1_0 E/EGL_emulation: tid 20068: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
02-09 21:40:13.901 20008-20068/com.einsambr.bridge_1_0 W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa047e880, error=EGL_BAD_MATCH
02-09 21:40:14.374 20008-20068/com.einsambr.bridge_1_0 E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa1b42a80
02-09 21:40:14.400 20008-20068/com.einsambr.bridge_1_0 E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa1b427e0
02-09 21:40:14.463 20008-3407/com.einsambr.bridge_1_0 V/FA: Activity resumed, time: 24512815
02-09 21:40:14.505 20008-20068/com.einsambr.bridge_1_0 E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa1b44060
02-09 21:40:14.607 20008-20068/com.einsambr.bridge_1_0 E/EGL_emulation: tid 20068: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
02-09 21:40:14.607 20008-20068/com.einsambr.bridge_1_0 W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x978da720, error=EGL_BAD_MATCH
02-09 21:40:16.860 20008-3407/com.einsambr.bridge_1_0 V/FA: Recording user engagement, ms: 2399
02-09 21:40:16.861 20008-3407/com.einsambr.bridge_1_0 V/FA: Activity paused, time: 24515213
02-09 21:40:16.862 20008-3407/com.einsambr.bridge_1_0 D/FA: Logging event (FE): _e, Bundle[{_o=auto, _et=2399, _sc=MainActivity, _si=-452943598100446929}]
02-09 21:40:16.896 20008-20008/com.einsambr.bridge_1_0 V/FA: onActivityCreated
02-09 21:40:16.986 20008-3407/com.einsambr.bridge_1_0 V/FA: Activity resumed, time: 24515340
02-09 21:40:17.051 20008-20068/com.einsambr.bridge_1_0 E/EGL_emulation: tid 20068: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
02-09 21:40:17.051 20008-20068/com.einsambr.bridge_1_0 W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x986a74c0, error=EGL_BAD_MATCH
02-09 21:40:17.282 20008-20068/com.einsambr.bridge_1_0 E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa1b44140
02-09 21:40:17.970 20008-20068/com.einsambr.bridge_1_0 E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa1b438f0
02-09 21:40:18.040 20008-20068/com.einsambr.bridge_1_0 E/EGL_emulation: tid 20068: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
02-09 21:40:18.040 20008-20068/com.einsambr.bridge_1_0 W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x98695ce0, error=EGL_BAD_MATCH
02-09 21:40:21.466 20008-20068/com.einsambr.bridge_1_0 E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa1b44060
02-09 21:40:21.504 20008-20068/com.einsambr.bridge_1_0 E/EGL_emulation: tid 20068: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
02-09 21:40:21.504 20008-20068/com.einsambr.bridge_1_0 W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x975645e0, error=EGL_BAD_MATCH
02-09 21:40:21.987 20008-3407/com.einsambr.bridge_1_0 V/FA: Inactivity, disconnecting from the service
02-09 21:40:22.088 20008-20042/com.einsambr.bridge_1_0 W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
02-09 21:40:24.971 20008-20068/com.einsambr.bridge_1_0 E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa1b438f0
02-09 21:40:25.013 20008-20068/com.einsambr.bridge_1_0 E/EGL_emulation: tid 20068: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
02-09 21:40:25.013 20008-20068/com.einsambr.bridge_1_0 W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x974ee760, error=EGL_BAD_MATCH
02-09 21:40:28.475 20008-20068/com.einsambr.bridge_1_0 E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa1b44060
02-09 21:40:28.517 20008-20068/com.einsambr.bridge_1_0 E/EGL_emulation: tid 20068: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
02-09 21:40:28.517 20008-20068/com.einsambr.bridge_1_0 W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x97564840, error=EGL_BAD_MATCH
Codes for authenticaion:
private FirebaseAuth firebaseAuth;
private FirebaseAuth.AuthStateListener authStateListener;
public static final int RC_SIGN_IN=1;
public static String userUID="";
public static boolean logOut=false;
#Override protected void onCreate(Bundle savedInstanceState)
{
firebaseAuth= FirebaseAuth.getInstance();
SetAuthStateListener();
}
private void SetAuthStateListener()
{
authStateListener=new FirebaseAuth.AuthStateListener()
{
#Override public void onAuthStateChanged(#NonNull FirebaseAuth firebaseAuth)
{
FirebaseUser user=firebaseAuth.getCurrentUser();
if(user!=null)
{
userUID=firebaseAuth.getCurrentUser().getUid();
Toast.makeText(MainActivity.this,"User Name: "+userUID,Toast.LENGTH_LONG).show();
//......some stuffs to do
}
else
{
startActivityForResult(
AuthUI.getInstance()
.createSignInIntentBuilder()
.setProviders(Arrays.asList(new AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(),
new AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build(),
new AuthUI.IdpConfig.Builder(AuthUI.FACEBOOK_PROVIDER).build()))
.build(),
RC_SIGN_IN);
}
}
};
}
#Override protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
super.onActivityResult(requestCode, resultCode, data);
if(requestCode==RC_SIGN_IN)
{
if(resultCode==RESULT_OK)
{
userUID=firebaseAuth.getCurrentUser().getUid();
Toast.makeText(this,"You are signed in!",Toast.LENGTH_LONG).show();
}
else if(resultCode==RESULT_CANCELED)
{
Toast.makeText(this,"Sign in cancelled",Toast.LENGTH_LONG).show();
finish();
}
}
}
#Override protected void onResume()
{
super.onResume();
firebaseAuth.addAuthStateListener(authStateListener);
if(logOut)//I set the LOGOUT button in another activity. When it is pressed on, the public static boolean "logout" will be changed to "true", and also the user will be back to MainActivity and actually log-out here in OnReSume() method.
{
logOut=false;
AuthUI.getInstance().signOut(MainActivity.this);
}
}
#Override protected void onPause()
{
super.onPause();
firebaseAuth.removeAuthStateListener(authStateListener);
}

Google Play Services out of date in Android Emulator

I have an android emulator with Marshmallow and Google Apis.
For some reason the Google Play Services got stuck in release 8.1.85 and it doesn't get updated.
My app uses the 8.3 release in Android Studio Gradle:
compile 'com.google.android.gms:play-services:8.3.0'
When the app starts it detects it is out of date so the "update dialog" appears. Clicking on update it does nothing. I get this log:
12-21 12:21:46.369 3516-3516/app.pack.com W/GooglePlayServicesUtil: Google Play services out of date. Requires 8298000 but found 8185470
12-21 12:21:46.548 3516-3541/app.pack.com W/EGL_emulation: eglSurfaceAttrib not implemented
12-21 12:21:46.548 3516-3541/app.pack.com W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xabff10c0, error=EGL_SUCCESS
12-21 12:21:46.685 3516-3541/app.pack.com W/EGL_emulation: eglSurfaceAttrib not implemented
12-21 12:21:46.686 3516-3541/app.pack.com W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xb3f09320, error=EGL_SUCCESS
12-21 12:21:47.065 3516-3541/app.pack.com W/EGL_emulation: eglSurfaceAttrib not implemented
12-21 12:21:47.065 3516-3541/app.pack.com W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xb3f3f240, error=EGL_SUCCESS
12-21 12:21:50.302 3516-3541/app.pack.com E/Surface: getSlotFromBufferLocked: unknown buffer: 0xab7980b0
12-21 12:21:56.326 3516-3516/app.pack.com E/SettingsRedirect: Can't redirect to app settings for Google Play services
12-21 12:21:56.333 3516-3541/app.pack.com E/Surface: getSlotFromBufferLocked: unknown buffer: 0xab796d70
12-21 12:21:56.339 3516-3541/app.pack.com D/OpenGLRenderer: endAllStagingAnimators on 0xa19fa980 (RippleDrawable) with handle 0xb12c9ac0
12-21 12:21:56.366 3516-3516/app.pack.com W/GooglePlayServicesUtil: Google Play services out of date. Requires 8298000 but found 8185470
12-21 12:21:56.432 3516-3541/app.pack.com W/EGL_emulation: eglSurfaceAttrib not implemented
12-21 12:21:56.432 3516-3541/app.pack.com W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xad71b0c0, error=EGL_SUCCESS
12-21 12:21:56.793 3516-3541/app.pack.com W/EGL_emulation: eglSurfaceAttrib not implemented
12-21 12:21:56.793 3516-3541/app.pack.com W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xb3f3f920, error=EGL_SUCCESS
12-21 12:22:00.027 3516-3541/app.pack.com E/Surface: getSlotFromBufferLocked: unknown buffer: 0xab798e40
The solution I've tried for this issue before is to change:
compile 'com.google.android.gms:play-services:8.3.0'
to
compile 'com.google.android.gms:play-services:7.+'
Sometimes, what is reflected on the gradle is not the actual version and by putting + the app will automatically use the latest version available.
Here is solution: using AVD image with build-in Google Play Services. It will enable you to use Google Services including Google Play. Also you will be able update it without re-creating AVD image.
Open AVD manager and choose create new device. You should use device definition with play store icon.
Then choose system image for it. You should choose one with Google Play and NOT with Google API.
Then launch new device.
You can update Play Services as shown on screenshot, or manually on device..

How do you prevent android apps from crashing when you have many activities?

I'm new to android and am making an app which features many activities and a user prefs get edited during almost every one, and it seems that it randomly starts crashing 6 or 7 activities in, and opening up a different activity from a couple of pages ago, but only sometimes. I do everything exactly the same each time and I don't know what causes it to crash. Usually it will crash back to a different intent and let me continue from there. Here is the logcat after a crash:
10-31 13:01:52.122 2542-2542/? I/art: Not late-enabling -Xcheck:jni (already on)
10-31 13:01:52.253 2542-2542/? I/art: Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.hardware.fingerprint.FingerprintManagerCompatApi23$1>
10-31 13:01:52.253 2542-2542/? I/art: Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.hardware.fingerprint.FingerprintManagerCompatApi23$1>
10-31 13:01:52.360 2542-2542/? W/art: Before Android 4.1, method int android.support.v7.internal.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
10-31 13:01:52.516 2542-2558/? D/OpenGLRenderer: Render dirty regions requested: true
10-31 13:01:52.517 2542-2542/? D/: HostConnection::get() New Host Connection established 0xa66e01b0, tid 2542
10-31 13:01:52.522 2542-2542/? D/Atlas: Validating map...
10-31 13:01:52.569 2542-2558/? D/: HostConnection::get() New Host Connection established 0xa66e0260, tid 2558
10-31 13:01:52.578 2542-2558/? I/OpenGLRenderer: Initialized EGL, version 1.4
10-31 13:01:52.592 2542-2558/? D/OpenGLRenderer: Enabling debug mode 0
10-31 13:01:52.602 2542-2558/? W/EGL_emulation: eglSurfaceAttrib not implemented
10-31 13:01:52.602 2542-2558/? W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa66b4b20, error=EGL_SUCCESS

Android application starts on emulator but does not respond

Everything was working fine yesterday and today, my application does not respond on the emulator! It's driving me crazy as I have done nothing different or made any changes apart from updating Android Studio and I do not know if that's the cause. The app launches on the emulator but it keeps flickering on and off. Other apps work fine.
My logcat output gives me this and doesn't stop!:
--------- beginning of system
08-28 14:29:16.772 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:16.772 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa370ae00, error=EGL_SUCCESS
08-28 14:29:16.890 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:17.009 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:17.009 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa28cad20, error=EGL_SUCCESS
08-28 14:29:17.233 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:17.312 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:17.312 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa29a7b60, error=EGL_SUCCESS
08-28 14:29:17.382 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:17.529 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:17.529 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa29a7b40, error=EGL_SUCCESS
08-28 14:29:17.839 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:17.883 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:17.883 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2a98dc0, error=EGL_SUCCESS
08-28 14:29:17.926 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:18.097 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:18.097 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2a98da0, error=EGL_SUCCESS
08-28 14:29:18.282 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:18.339 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:18.339 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2ba3480, error=EGL_SUCCESS
08-28 14:29:18.539 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:18.628 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:18.628 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa327f3a0, error=EGL_SUCCESS
08-28 14:29:18.674 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:18.840 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:18.840 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa327f380, error=EGL_SUCCESS
08-28 14:29:19.136 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:19.195 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:19.195 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa250aa40, error=EGL_SUCCESS
08-28 14:29:19.323 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:19.543 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:19.543 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa25843a0, error=EGL_SUCCESS
08-28 14:29:19.657 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:19.840 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:19.840 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa25f0600, error=EGL_SUCCESS
08-28 14:29:20.047 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:20.191 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:20.191 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2601260, error=EGL_SUCCESS
08-28 14:29:20.398 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:20.461 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:20.461 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa243a740, error=EGL_SUCCESS
08-28 14:29:20.667 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:20.771 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:20.771 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa24477e0, error=EGL_SUCCESS
08-28 14:29:20.979 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:21.072 1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:21.072 1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2447720, error=EGL_SUCCESS
08-28 14:29:21.264 1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
And my console is this..:
emulator: device fd:784
HAXM is working and emulator runs in fast virt mode
emulator: warning: opening audio input failed
creating window 61 83 462 820
emulator: emulator window was out of view and was recentered
draw: Could not use program error=0x505
draw: Could not use program error=0x505
draw: Could not use program error=0x505
draw: Could not use program error=0x505
draw: Could not use program error=0x505
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
draw: Could not use program error=0x505
draw: Could not use program error=0x505
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
draw: Could not use program error=0x505
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
draw: Could not use program error=0x505
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
draw: Could not use program error=0x505
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
draw: Could not run program: Ü
draw: Could not run program: à
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: î
draw: Could not run program: î
draw: Could not run program: î
draw: Could not run program: ð
draw: Could not run program: ð
ColorBuffer::bindFbo: FBO not complete: 0
draw: Could not run program: ò
These outputs don't stop!! Please any help will be appreciated..
If anything else is needed let me know!!
I don't have a solution to "solve" the problem, but what if you by-passed this by creating a new AVD and use it as default emulator?
Try to create another vm.
Check gradle version.
Reinstall api packages.
For future references, I've solved my problem by returning to an older version of my app and starting again from there. No matter how much research I have done, I didn't find a straight forward solution. Apparently this has to do with the OpenGLRenderer but I'm not sure in which way.
Best advice I can give is to make constant copies of your app at various stages in case something like this happens. In addition, always make sure you save your files before updating Android Studio because it can mess things up and be careful at what stage of your project you update it.
I myself found emulator extremely useless. Use real android device and then you know for sure if it works or not.

Android Studio - Genymotion - Volley gets wrong url to download

I'm facing this really strange issue and I couldn't realize what's happening.
I have a login activity and when I try to make a request to validate the user information, I get this error in volley:
com.android.volley.NoConnectionError: java.net.UnknownHostException: Unable to resolve host "teste.escolaemmovimento.com.br": No address associated with hostname.
This error only happens when I'm using the Genymotion emulator, I verify the URL field inside of the volley Request object right after create that and after insert the request in the volley queue and the correct url is there.
(when I test in the device this error does not happens.)
LogCat:
06-01 13:17:28.351 25469-25521/br.com.escolaemmovimento D/OpenGLRenderer﹕ Render dirty regions requested: true
06-01 13:17:28.362 25469-25469/br.com.escolaemmovimento D/﹕ HostConnection::get() New Host Connection established 0xabb84990, tid 25469
06-01 13:17:28.374 25469-25469/br.com.escolaemmovimento D/Atlas﹕ Validating map...
06-01 13:17:28.556 25469-25521/br.com.escolaemmovimento D/libEGL﹕ loaded /system/lib/egl/libEGL_emulation.so
06-01 13:17:28.557 25469-25521/br.com.escolaemmovimento D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_emulation.so
06-01 13:17:28.568 25469-25521/br.com.escolaemmovimento D/libEGL﹕ loaded /system/lib/egl/libGLESv2_emulation.so
06-01 13:17:28.578 25469-25521/br.com.escolaemmovimento D/﹕ HostConnection::get() New Host Connection established 0xaf60b940, tid 25521
06-01 13:17:28.604 25469-25521/br.com.escolaemmovimento I/OpenGLRenderer﹕ Initialized EGL, version 1.4
06-01 13:17:28.635 25469-25521/br.com.escolaemmovimento D/OpenGLRenderer﹕ Enabling debug mode 0
06-01 13:17:28.650 25469-25521/br.com.escolaemmovimento W/EGL_emulation﹕ eglSurfaceAttrib not implemented
06-01 13:17:28.651 25469-25521/br.com.escolaemmovimento W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xaf639400, error=EGL_SUCCESS
06-01 13:17:54.808 25469-25469/br.com.escolaemmovimento I/System.out﹕ com.android.volley.NoConnectionError: java.net.UnknownHostException: Unable to resolve host "teste.escolaemmovimento.com.br": No address associated with hostname
Anyone has already faced this issue? This is a problem only associate with the emulator? Thanks for any help.
UnknownHostException is thrown to indicate that the IP address of a host could not be determined. Make sure you have internet access inside of Genymotion.

Categories

Resources