A
A
Agrael313 Zashefrovano2021-08-26 12:33:21
android studio
Agrael313 Zashefrovano, 2021-08-26 12:33:21

Hello, I have a problem when launching the created application, what should I do to fix it?

Launching 'app' on My device API 29.
App restart successful without requiring a re-install.
$ adb shell am start -n "com.example.visourschatsfriends/com.example.visourschatsfriends.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 18630 ​​on device 'My_device_API_29 [emulator -5554]'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/urschatsfriend: Long monitor contention with owner main (18630) at void android.content.res.AssetManager.nativeSetConfiguration(long, int, int, java.lang.String, int, int, int, int, int, int, int , int, int, int, int, int, int, int, int)(AssetManager.java:-2) waiters=0 in void android.app.ActivityThread.updatePendingConfiguration(android.content.res.Configuration) for 382ms
I/ FirebaseApp: Device unlocked: initializing all Firebase APIs for app [DEFAULT]
I/FirebaseInitProvider: FirebaseApp initialization successful
W/GooglePlayServicesUtil: Google Play Store is missing.
E/ActivityThread: Failed to find provider info for com.google.android.gms.chimera
W/DynamiteModule: Failed to retrieve remote module version.
D/libEGL: Emulator has host GPU support, qemu.gles is set to 1.
E/DynamiteModule: Failed to load IDynamiteLoader from GmsCore: Application package com.google.android.gms not found
I/DynamiteModule: Considering local module com.google .android.gms.measurement.dynamite:51 and remote module com.google.android.gms.measurement.dynamite:0
Selected local version of com.google.android.gms.measurement.dynamite
W/libc: Unable to set property " qemu.gles" to "1": connection failed; errno=13 (Permission denied)
E/DynamiteModule: Failed to load IDynamiteLoader from GmsCore: Application package com.google.android.gms not found
I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to fallback implementation
V/FA: onActivityCreated
W/urschatsfriend: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
W/urschatsfriend: Accessing hidden method Landroid/view/ViewGroup ;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
D/libEGL: loaded /vendor/lib64/egl/libEGL_emulation.so
D/libEGL: loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
D/libEGL: loaded / vendor/lib64/egl/libGLESv2_emulation.so
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.visourschatsfriends, PID: 18630
java.lang.RuntimeException: Unable to start
activity android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app .servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android. app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com. android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.ClassCastException: androidx.constraintlayout.widget.ConstraintLayout cannot be cast to android.widget.RelativeLayout
at com.example.visourschatsfriends.MainActivity. onCreate(MainActivity.java:38)
at android.app.Activity.performCreate(Activity.java:7802)
at android.app.Activity.performCreate(Activity.java:7791)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299)
at android.app. ActivityThread.performLaunchActivity(ActivityThread.java:3245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 
at android.app.servertransaction.TransactionExecutor .executeCallbacks(TransactionExecutor.java:135) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) 
at android.os.Handler.dispatchMessage(Handler.java:107) 
at android.os.Looper.loop(Looper.java:214) 
at android. app.ActivityThread.main(ActivityThread.java:7356) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 
at com. android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 
I/Process: Sending signal. PID: 18630 ​​SIG: 9
W/RenderThread: type=1400 audit(0.0:66): avc: denied { write } for name="property_service" dev="tmpfs" ino=6722 scontext=u:r:untrusted_app:s0:c106,c256,c512, c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0 app=com.example.visourschatsfriends

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2021-08-30
@Lazarusnode13

Everything is in the logs.

MainActivity}: java.lang.ClassCastException: androidx.constraintlayout.widget.ConstraintLayout cannot be cast to android.widget.RelativeLayout

Somewhere in your layout for MainActivity (activity_main.xml) ConstraintLayout is used, which you cast/cast to RelativeLayout in your code in MainActivity . See what you have in the onCreate(MainActivity.java:38) method on line 38

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question