I am trying to call asp.net web api from Android Client using Volley library. The .net API is working fine and listening ports are:
http://localhost:5000 and https://localhost:5001 in my local machine.
But,When, I try to run android client keeping the base url as http://10.0.2.2:5000/api/login
I found below error in console->
04/23 23:13:41: Launching 'app' on Nexus 6 API 24.
Install successfully finished in 9 s 435 ms.
$ adb shell am start -n "com.example.tourexpwip/com.example.tourexpwip.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 3662 on device 'Nexus_6_API_24 [emulator-5554]'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/art: Late-enabling -Xcheck:jni
W/art: Unexpected CPU variant for X86 using defaults: x86
W/System: ClassLoader referenced unknown path: /data/app/com.example.tourexpwip-1/lib/x86
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
I/System.out: URL: http://10.0.2.2:5000/api/login/
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/: HostConnection::get() New Host Connection established 0xa67ec7c0, tid 3662
E/Volley: [210] NetworkUtility.shouldRetryException: Unexpected response code 307 for http://10.0.2.2:5000/api/login/
D/: HostConnection::get() New Host Connection established 0xa67ecac0, tid 3683
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/OpenGLRenderer: Swap behavior 0
D/EGL_emulation: eglCreateContext: 0xb5c05660: maj 2 min 0 rcv 2
D/EGL_emulation: eglMakeCurrent: 0xb5c05660: ver 2 0 (tinfo 0xb5c032b0)
W/System.err: com.android.volley.ServerError
at com.android.volley.toolbox.NetworkUtility.shouldRetryException(NetworkUtility.java:201)
W/System.err: at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:145)
at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:132)
W/System.err: at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90)
I/Choreographer: Skipped 68 frames! The application may be doing too much work on its main thread.
D/EGL_emulation: eglMakeCurrent: 0xb5c05660: ver 2 0 (tinfo 0xb5c032b0)
I/Choreographer: Skipped 35 frames! The application may be doing too much work on its main thread.
The controller class for login in ASP.NET web api->
namespace TourExpWIP1.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class LoginController : ControllerBase
{
NetCoreAuthenticationContext dbContext = new NetCoreAuthenticationContext();
public string Post([FromBody] TblUser value)
{
if (dbContext.TblUser.Any(user => user.UserName.Equals(value.UserName)))
{
TblUser user = dbContext.TblUser.Where(u => u.UserName.Equals(value.UserName)).First();
var client_post_hash_password = Convert.ToBase64String(
Common.SaltHashPassword(
Encoding.ASCII.GetBytes(value.Password),
Convert.FromBase64String(user.Salt)));
if (client_post_hash_password.Equals(user.Password))
return JsonConvert.SerializeObject(user);
else return JsonConvert.SerializeObject("Wrong Password");
}
else
{
return JsonConvert.SerializeObject("user does not exists in db");
}
}
}
}
Try this
1.In Android Manifiest, in tag application add:
inside tag application add this tag:
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
<application
android:usesCleartextTraffic="true"
android:networkSecurityConfig="#xml/network_security_config"
...
/>
2.With a corresponding network_security_config.xml in app/src/main/res/xml/:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>
More details please find from here- Link
I have just build a project with android kotlin but when I run the app it got crash, and in the logcat I found this error
java.lang.NullPointerException: DataBindingUtil.setConte….layout.activity_chapter) must not be null
ChapterActivity.kt
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import com.tutorial.kotlinfirebasecomicreader.Common.Common
import com.tutorial.kotlinfirebasecomicreader.Model.Comic
import com.tutorial.kotlinfirebasecomicreader.databinding.ActivityChapterBinding
class ChapterActivity : AppCompatActivity() {
private lateinit var binding: ActivityChapterBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = DataBindingUtil.setContentView(this, R.layout.activity_chapter)
binding.toolbar.title = Common.selected_comic!!.Name
binding.toolbar.setNavigationIcon(R.drawable.ic_baseline_chevron_left_24)
binding.toolbar.setNavigationOnClickListener {
finish() //GO BACK
}
binding.recyclerChapter.setHasFixedSize(true)
val layoutManager = LinearLayoutManager(this#ChapterActivity)
binding.recyclerChapter.layoutManager = layoutManager
binding.recyclerChapter.addItemDecoration(DividerItemDecoration(this, layoutManager.orientation))
fetchChapter (Common.selected_comic!!)
}
private fun fetchChapter(comic: Comic) {
Common.chapterList = comic.Chapters!!
binding.txtChapterName.text = StringBuilder("Chapter (")
.append(comic.Chapters!!.size)
.append(")")
}
}
I don't really know how to fix it and I need some help
Edited =>
activity_chapter.xml
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
</data>
<LinearLayout
android:orientation="vertical"
android:background="#android:color/white"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ChapterActivity">
<androidx.appcompat.widget.Toolbar
android:id="#+id/toolbar"
android:minHeight="?attr/actionBarSize"
app:titleTextColor="#color/textColor"
android:background="#color/columnColor"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:orientation="horizontal"
android:padding="16dp"
android:weightSum="4"
android:background="#color/black"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="#+id/txt_chapter_name"
android:text="Chapter (10)"
android:textColor="#color/textColor"
android:textSize="20sp"
android:textStyle="bold"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="#+id/recycler_chapter"
android:padding="8dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</layout>
Stack Trace =>
2021-03-04 11:55:23.033 11911-11911/? I/basecomicreade: Not late-enabling -Xcheck:jni (already on)
2021-03-04 11:55:23.106 11911-11911/? I/basecomicreade: Unquickening 13 vdex files!
2021-03-04 11:55:23.108 11911-11911/? W/basecomicreade: Unexpected CPU variant for X86 using defaults: x86_64
2021-03-04 11:55:23.913 11911-11911/com.tutorial.kotlinfirebasecomicreader W/ComponentDiscovery: Class com.google.firebase.dynamicloading.DynamicLoadingRegistrar is not an found.
2021-03-04 11:55:23.933 11911-11911/com.tutorial.kotlinfirebasecomicreader I/FirebaseApp: Device unlocked: initializing all Firebase APIs for app [DEFAULT]
2021-03-04 11:55:23.957 11911-11911/com.tutorial.kotlinfirebasecomicreader I/FirebaseInitProvider: FirebaseApp initialization successful
2021-03-04 11:55:24.001 11911-11932/com.tutorial.kotlinfirebasecomicreader W/basecomicreade: Unsupported class loader
2021-03-04 11:55:24.010 11911-11932/com.tutorial.kotlinfirebasecomicreader I/DynamiteModule: Considering local module com.google.android.gms.measurement.dynamite:46 and remote module com.google.android.gms.measurement.dynamite:45
2021-03-04 11:55:24.010 11911-11932/com.tutorial.kotlinfirebasecomicreader I/DynamiteModule: Selected local version of com.google.android.gms.measurement.dynamite
2021-03-04 11:55:24.053 11911-11937/com.tutorial.kotlinfirebasecomicreader D/libEGL: loaded /vendor/lib64/egl/libEGL_emulation.so
2021-03-04 11:55:24.055 11911-11937/com.tutorial.kotlinfirebasecomicreader D/libEGL: loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
2021-03-04 11:55:24.062 11911-11937/com.tutorial.kotlinfirebasecomicreader D/libEGL: loaded /vendor/lib64/egl/libGLESv2_emulation.so
2021-03-04 11:55:24.160 11911-11911/com.tutorial.kotlinfirebasecomicreader D/skia: Warning: an opaque image should be decoded as opaque - it is being decoded as non-opaque, which will draw slower
2021-03-04 11:55:24.200 11911-11932/com.tutorial.kotlinfirebasecomicreader V/FA: onActivityCreated
2021-03-04 11:55:24.250 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: App measurement collection enabled
2021-03-04 11:55:24.254 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: App measurement enabled for app package, google app id: com.tutorial.kotlinfirebasecomicreader, 1:705167416733:android:e2429adee28166ea782374
2021-03-04 11:55:24.256 11911-11938/com.tutorial.kotlinfirebasecomicreader I/FA: App measurement initialized, version: 39000
2021-03-04 11:55:24.256 11911-11938/com.tutorial.kotlinfirebasecomicreader I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
2021-03-04 11:55:24.257 11911-11938/com.tutorial.kotlinfirebasecomicreader I/FA: To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app com.tutorial.kotlinfirebasecomicreader
2021-03-04 11:55:24.257 11911-11938/com.tutorial.kotlinfirebasecomicreader D/FA: Debug-level message logging enabled
2021-03-04 11:55:24.287 11911-11911/com.tutorial.kotlinfirebasecomicreader W/basecomicreade: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
2021-03-04 11:55:24.288 11911-11911/com.tutorial.kotlinfirebasecomicreader W/basecomicreade: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
2021-03-04 11:55:24.354 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: Connecting to remote service
2021-03-04 11:55:24.420 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: Connection attempt already in progress
2021-03-04 11:55:24.476 11911-11935/com.tutorial.kotlinfirebasecomicreader D/HostConnection: HostConnection::get() New Host Connection established 0x7d323924d620, tid 11935
2021-03-04 11:55:24.490 11911-11935/com.tutorial.kotlinfirebasecomicreader D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_3_0
2021-03-04 11:55:24.507 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: Connection attempt already in progress
2021-03-04 11:55:24.509 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: Activity resumed, time: 57788511
2021-03-04 11:55:24.600 11911-11935/com.tutorial.kotlinfirebasecomicreader D/EGL_emulation: eglCreateContext: 0x7d323924e840: maj 3 min 0 rcv 3
2021-03-04 11:55:24.680 11911-11935/com.tutorial.kotlinfirebasecomicreader D/EGL_emulation: eglMakeCurrent: 0x7d323924e840: ver 3 0 (tinfo 0x7d32392d78c0)
2021-03-04 11:55:24.690 11911-11938/com.tutorial.kotlinfirebasecomicreader I/FA: Tag Manager is not found and thus will not be used
2021-03-04 11:55:24.706 11911-11935/com.tutorial.kotlinfirebasecomicreader I/Gralloc4: mapper 4.x is not supported
2021-03-04 11:55:24.707 11911-11935/com.tutorial.kotlinfirebasecomicreader W/Gralloc3: mapper 3.x is not supported
2021-03-04 11:55:24.712 11911-11935/com.tutorial.kotlinfirebasecomicreader D/HostConnection: createUnique: call
2021-03-04 11:55:24.712 11911-11935/com.tutorial.kotlinfirebasecomicreader D/HostConnection: HostConnection::get() New Host Connection established 0x7d323924eac0, tid 11935
2021-03-04 11:55:24.713 11911-11935/com.tutorial.kotlinfirebasecomicreader D/eglCodecCommon: allocate: Ask for block of size 0x100
2021-03-04 11:55:24.713 11911-11935/com.tutorial.kotlinfirebasecomicreader D/eglCodecCommon: allocate: ioctl allocate returned offset 0x3fe042000 size 0x2000
2021-03-04 11:55:24.716 11911-11935/com.tutorial.kotlinfirebasecomicreader D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_3_0
2021-03-04 11:55:24.730 11911-11935/com.tutorial.kotlinfirebasecomicreader D/EGL_emulation: eglMakeCurrent: 0x7d323924e840: ver 3 0 (tinfo 0x7d32392d78c0)
2021-03-04 11:55:24.795 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: Connection attempt already in progress
2021-03-04 11:55:24.797 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: Connection attempt already in progress
2021-03-04 11:55:25.306 11911-11935/com.tutorial.kotlinfirebasecomicreader I/OpenGLRenderer: Davey! duration=900ms; Flags=1, IntendedVsync=57788545708266, Vsync=57788579041598, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=57788595779340, AnimationStart=57788595852830, PerformTraversalsStart=57788595904150, DrawStart=57788869782150, SyncQueued=57788872423620, SyncStart=57788883887770, IssueDrawCommandsStart=57788884972440, SwapBuffers=57789368117580, FrameCompleted=57789457618760, DequeueBufferDuration=307500, QueueBufferDuration=1103560, GpuCompleted=0,
2021-03-04 11:55:25.576 11911-11938/com.tutorial.kotlinfirebasecomicreader D/FA: Connected to remote service
2021-03-04 11:55:25.577 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: Processing queued up service tasks: 5
2021-03-04 11:55:27.569 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: Recording user engagement, ms: 3024
2021-03-04 11:55:27.599 11911-11932/com.tutorial.kotlinfirebasecomicreader V/FA: onActivityCreated
2021-03-04 11:55:27.787 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: Activity paused, time: 57791583
2021-03-04 11:55:27.924 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: Activity resumed, time: 57792074
2021-03-04 11:55:27.986 11911-11946/com.tutorial.kotlinfirebasecomicreader D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-03-04 11:55:27.994 11911-11911/com.tutorial.kotlinfirebasecomicreader E/RecyclerView: No adapter attached; skipping layout
2021-03-04 11:55:28.090 11911-11946/com.tutorial.kotlinfirebasecomicreader W/basecomicreade: Verification of java.util.Set com.android.org.conscrypt.SSLUtils.getSupportedClientKeyTypes(byte[], int[]) took 100.226ms (648.53 bytecodes/s) (3304B approximate peak alloc)
2021-03-04 11:55:28.260 11911-11935/com.tutorial.kotlinfirebasecomicreader D/EGL_emulation: eglMakeCurrent: 0x7d323924e840: ver 3 0 (tinfo 0x7d32392d78c0)
2021-03-04 11:55:28.732 11911-11946/com.tutorial.kotlinfirebasecomicreader W/basecomicreade: Verification of boolean com.android.org.conscrypt.CertBlacklistImpl.isHex(java.lang.String) took 124.689ms (288.72 bytecodes/s) (2168B approximate peak alloc)
2021-03-04 11:55:28.836 11911-11911/com.tutorial.kotlinfirebasecomicreader I/Choreographer: Skipped 51 frames! The application may be doing too much work on its main thread.
2021-03-04 11:55:28.880 11911-11930/com.tutorial.kotlinfirebasecomicreader I/basecomicreade: Waiting for a blocking GC ProfileSaver
2021-03-04 11:55:28.887 11911-11930/com.tutorial.kotlinfirebasecomicreader I/basecomicreade: WaitForGcToComplete blocked ProfileSaver on RunEmptyCheckpoint for 7.720ms
2021-03-04 11:55:29.270 11911-11935/com.tutorial.kotlinfirebasecomicreader I/OpenGLRenderer: Davey! duration=1239ms; Flags=0, IntendedVsync=57792137367431, Vsync=57792987367397, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=57792988665860, AnimationStart=57792988801340, PerformTraversalsStart=57792989546070, DrawStart=57792989762430, SyncQueued=57792990250570, SyncStart=57792999374600, IssueDrawCommandsStart=57792999429610, SwapBuffers=57793072211200, FrameCompleted=57793385836850, DequeueBufferDuration=20442430, QueueBufferDuration=76115660, GpuCompleted=77309411328,
2021-03-04 11:55:29.691 11911-11935/com.tutorial.kotlinfirebasecomicreader D/EGL_emulation: eglMakeCurrent: 0x7d323924e840: ver 3 0 (tinfo 0x7d32392d78c0)
2021-03-04 11:55:29.792 11911-11935/com.tutorial.kotlinfirebasecomicreader I/OpenGLRenderer: Davey! duration=1803ms; Flags=1, IntendedVsync=57792137367431, Vsync=57792987367397, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=57792988665860, AnimationStart=57792988801340, PerformTraversalsStart=57792989546070, DrawStart=57793838734440, SyncQueued=57793840519500, SyncStart=57793843650750, IssueDrawCommandsStart=57793843800190, SwapBuffers=57793936524990, FrameCompleted=57793943762960, DequeueBufferDuration=82930, QueueBufferDuration=274660, GpuCompleted=8810055295132672,
2021-03-04 11:55:29.797 11911-11911/com.tutorial.kotlinfirebasecomicreader I/Choreographer: Skipped 57 frames! The application may be doing too much work on its main thread.
2021-03-04 11:55:29.887 11911-11935/com.tutorial.kotlinfirebasecomicreader D/EGL_emulation: eglMakeCurrent: 0x7d323924e840: ver 3 0 (tinfo 0x7d32392d78c0)
2021-03-04 11:55:30.096 11911-11935/com.tutorial.kotlinfirebasecomicreader I/OpenGLRenderer: Davey! duration=1062ms; Flags=0, IntendedVsync=57792995727619, Vsync=57793945727581, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=57793949431810, AnimationStart=57793949481480, PerformTraversalsStart=57793952149640, DrawStart=57793952476430, SyncQueued=57793953226090, SyncStart=57794142461760, IssueDrawCommandsStart=57794149759670, SwapBuffers=57794236027780, FrameCompleted=57794247497260, DequeueBufferDuration=296420, QueueBufferDuration=1234510, GpuCompleted=137654660947320,
2021-03-04 11:55:30.221 11911-11935/com.tutorial.kotlinfirebasecomicreader D/EGL_emulation: eglMakeCurrent: 0x7d323924e840: ver 3 0 (tinfo 0x7d32392d78c0)
2021-03-04 11:55:30.455 11911-11935/com.tutorial.kotlinfirebasecomicreader I/OpenGLRenderer: Davey! duration=1270ms; Flags=0, IntendedVsync=57792995727619, Vsync=57793945727581, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=57793949431810, AnimationStart=57793949481480, PerformTraversalsStart=57793952149640, DrawStart=57794142711790, SyncQueued=57794142809910, SyncStart=57794483167180, IssueDrawCommandsStart=57794483392980, SwapBuffers=57794595122060, FrameCompleted=57794606716760, DequeueBufferDuration=131380, QueueBufferDuration=409730, GpuCompleted=137657109016869,
2021-03-04 11:55:30.456 11911-11935/com.tutorial.kotlinfirebasecomicreader D/EGL_emulation: eglMakeCurrent: 0x7d323924e840: ver 3 0 (tinfo 0x7d32392d78c0)
2021-03-04 11:55:30.511 11911-11911/com.tutorial.kotlinfirebasecomicreader D/Slider: onImageSlideChange() called with: position = [0]
2021-03-04 11:55:30.511 11911-11911/com.tutorial.kotlinfirebasecomicreader I/SlideIndicatorsGroup: onSlideChange: 0
2021-03-04 11:55:30.515 11911-11911/com.tutorial.kotlinfirebasecomicreader I/SlideIndicatorsGroup: onSlideChange: 0
2021-03-04 11:55:30.525 11911-11911/com.tutorial.kotlinfirebasecomicreader I/Choreographer: Skipped 42 frames! The application may be doing too much work on its main thread.
2021-03-04 11:55:30.608 11911-11911/com.tutorial.kotlinfirebasecomicreader W/basecomicreade: Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (greylist,core-platform-api, reflection, allowed)
2021-03-04 11:55:30.608 11911-11911/com.tutorial.kotlinfirebasecomicreader W/basecomicreade: Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (greylist,core-platform-api, reflection, allowed)
2021-03-04 11:55:30.608 11911-11911/com.tutorial.kotlinfirebasecomicreader W/basecomicreade: Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (greylist,core-platform-api, reflection, allowed)
2021-03-04 11:55:30.718 11911-11935/com.tutorial.kotlinfirebasecomicreader D/EGL_emulation: eglMakeCurrent: 0x7d323924e840: ver 3 0 (tinfo 0x7d32392d78c0)
2021-03-04 11:55:31.073 11911-11935/com.tutorial.kotlinfirebasecomicreader I/OpenGLRenderer: Davey! duration=1118ms; Flags=1, IntendedVsync=57793962375754, Vsync=57794662375726, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=57794676994830, AnimationStart=57794677072830, PerformTraversalsStart=57794677609830, DrawStart=57794835905760, SyncQueued=57794837936740, SyncStart=57794982254730, IssueDrawCommandsStart=57794985287860, SwapBuffers=57795092878620, FrameCompleted=57795224849780, DequeueBufferDuration=215540, QueueBufferDuration=11529020, GpuCompleted=0,
2021-03-04 11:55:33.429 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: Inactivity, disconnecting from the service
2021-03-04 11:55:35.432 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: Recording user engagement, ms: 7288
2021-03-04 11:55:35.455 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: Connecting to remote service
2021-03-04 11:55:35.460 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: Activity paused, time: 57799379
2021-03-04 11:55:35.589 11911-11932/com.tutorial.kotlinfirebasecomicreader V/FA: onActivityCreated
2021-03-04 11:55:35.668 11911-11911/com.tutorial.kotlinfirebasecomicreader D/AndroidRuntime: Shutting down VM
2021-03-04 11:55:35.669 11911-11911/com.tutorial.kotlinfirebasecomicreader E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.tutorial.kotlinfirebasecomicreader, PID: 11911
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tutorial.kotlinfirebasecomicreader/com.tutorial.kotlinfirebasecomicreader.ChapterActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3344)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3488)
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:2049)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7506)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.intern
2021-03-04 11:55:35.782 11911-11938/com.tutorial.kotlinfirebasecomicreader V/FA: Connection attempt already in progress
The documentation says that DataBindingUtil.setContentView returns:
The binding associated with the inflated content view or null if the layoutId is not a data binding layout.
So I would have to assume that your layout is not a valid data binding layout, so the issue lies in your XML.
I would recommend reading: Binding expressions which shows you the syntax of a valid binding layout and also this: Data Binding Library fully to help get a comprehensive understanding.
Also the answer by #Teo does point out the recommended way to use data binding so unless you have a specific reason for using the generic version I would switch to that.
Can try to avoid using DataBindingUtil as it keeps return null in my case.
You can try using its own databinding.inflate, as it will always get the correct binding.
binding = ActivityChapterBinding.inflate(layoutInflater)
setContentView(binding.root)
This might sound dumb, but in my case, this happened after renaming a package
and I forgot to clean the project, if databinding refuses to detect the new package name, according to this answer try to disable databinding in Build.gradle (Module), sync then re-enable it
And if you're using google-services, you'll need to adjust the naming part for the google-services.json as well.
I have created a google map activity in android studio. I have also generated an api key from the link given and placed it in the appropriate place. But when I run the app it crashes without displaying anything. Here is the logcat
2018-12-19 16:13:00.080 17295-17295/? I/ik7.locationap: Not late-enabling -Xcheck:jni (already on)
2018-12-19 16:13:00.312 17295-17295/? W/ik7.locationap: Unexpected CPU variant for X86 using defaults: x86
2018-12-19 16:13:00.667 17295-17295/com.example.nik7.locationapp W/ik7.locationap: JIT profile information will not be recorded: profile file does not exits.
2018-12-19 16:13:00.669 17295-17295/com.example.nik7.locationapp I/chatty: uid=10087(com.example.nik7.locationapp) identical 10 lines
2018-12-19 16:13:00.670 17295-17295/com.example.nik7.locationapp W/ik7.locationap: JIT profile information will not be recorded: profile file does not exits.
2018-12-19 16:13:00.733 17295-17295/com.example.nik7.locationapp I/InstantRun: starting instant run server: is main process
2018-12-19 16:13:01.001 17295-17295/com.example.nik7.locationapp I/zzbz: Making Creator dynamically
2018-12-19 16:13:01.022 17295-17295/com.example.nik7.locationapp W/ik7.locationap: Unsupported class loader
2018-12-19 16:13:01.023 17295-17295/com.example.nik7.locationapp W/ik7.locationap: Skipping duplicate class check due to unsupported classloader
2018-12-19 16:13:01.033 17295-17295/com.example.nik7.locationapp I/DynamiteModule: Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:221
2018-12-19 16:13:01.033 17295-17295/com.example.nik7.locationapp I/DynamiteModule: Selected remote version of com.google.android.gms.maps_dynamite, version >= 221
2018-12-19 16:13:01.033 17295-17295/com.example.nik7.locationapp V/DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils
2018-12-19 16:13:01.113 17295-17295/com.example.nik7.locationapp W/ik7.locationap: Unsupported class loader
2018-12-19 16:13:01.131 17295-17295/com.example.nik7.locationapp W/ik7.locationap: Skipping duplicate class check due to unsupported classloader
2018-12-19 16:13:01.180 17295-17295/com.example.nik7.locationapp I/Google Maps Android API: Google Play services client version: 12451000
2018-12-19 16:13:01.192 17295-17295/com.example.nik7.locationapp I/Google Maps Android API: Google Play services package version: 14799040
2018-12-19 16:13:01.319 17295-17295/com.example.nik7.locationapp W/ik7.locationap: Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
2018-12-19 16:13:01.712 17295-17295/com.example.nik7.locationapp D/OpenGLRenderer: HWUI GL Pipeline
2018-12-19 16:13:01.877 17295-17341/com.example.nik7.locationapp I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2018-12-19 16:13:01.878 17295-17341/com.example.nik7.locationapp I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
2018-12-19 16:13:01.878 17295-17341/com.example.nik7.locationapp I/OpenGLRenderer: Initialized EGL, version 1.4
2018-12-19 16:13:01.878 17295-17341/com.example.nik7.locationapp D/OpenGLRenderer: Swap behavior 1
2018-12-19 16:13:01.883 17295-17341/com.example.nik7.locationapp W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2018-12-19 16:13:01.883 17295-17341/com.example.nik7.locationapp D/OpenGLRenderer: Swap behavior 0
2018-12-19 16:13:01.907 17295-17341/com.example.nik7.locationapp D/EGL_emulation: eglCreateContext: 0xe8310280: maj 2 min 0 rcv 2
2018-12-19 16:13:01.913 17295-17341/com.example.nik7.locationapp D/EGL_emulation: eglMakeCurrent: 0xe8310280: ver 2 0 (tinfo 0xe7093fa0)
2018-12-19 16:13:02.025 17295-17341/com.example.nik7.locationapp D/EGL_emulation: eglMakeCurrent: 0xe8310280: ver 2 0 (tinfo 0xe7093fa0)
2018-12-19 16:13:02.034 17295-17338/com.example.nik7.locationapp D/EGL_emulation: eglCreateContext: 0xe9d05f00: maj 1 min 0 rcv 1
2018-12-19 16:13:02.229 17295-17338/com.example.nik7.locationapp D/EGL_emulation: eglMakeCurrent: 0xe9d05f00: ver 1 0 (tinfo 0xe9d03470)
2018-12-19 16:13:02.564 17295-17319/com.example.nik7.locationapp D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2018-12-19 16:13:03.305 17295-17319/com.example.nik7.locationapp E/AndroidRuntime: FATAL EXCEPTION: Thread-6
Process: com.example.nik7.locationapp, PID: 17295
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion;
at ez.b(:com.google.android.gms.dynamite_mapsdynamite#14799084#14.7.99 (100700-223214910):3)
at ey.a(:com.google.android.gms.dynamite_mapsdynamite#14799084#14.7.99 (100700-223214910):3)
at fa.a(:com.google.android.gms.dynamite_mapsdynamite#14799084#14.7.99 (100700-223214910):15)
at com.google.maps.api.android.lib6.drd.al.a(:com.google.android.gms.dynamite_mapsdynamite#14799084#14.7.99 (100700-223214910):6)
at ed.a(:com.google.android.gms.dynamite_mapsdynamite#14799084#14.7.99 (100700-223214910):21)
at ed.run(:com.google.android.gms.dynamite_mapsdynamite#14799084#14.7.99 (100700-223214910):8)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.ProtocolVersion" on path: DexPathList[[zip file "/data/user_de/0/com.google.android.gms/app_chimera/m/00000015/MapsDynamite.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/00000015/MapsDynamite.apk!/lib/x86, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at ad.loadClass(:com.google.android.gms.dynamite_dynamiteloader#14799084#14.7.99 (100700-223214910):4)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at ez.b(:com.google.android.gms.dynamite_mapsdynamite#14799084#14.7.99 (100700-223214910):3)
at ey.a(:com.google.android.gms.dynamite_mapsdynamite#14799084#14.7.99 (100700-223214910):3)
at fa.a(:com.google.android.gms.dynamite_mapsdynamite#14799084#14.7.99 (100700-223214910):15)
at com.google.maps.api.android.lib6.drd.al.a(:com.google.android.gms.dynamite_mapsdynamite#14799084#14.7.99 (100700-223214910):6)
at ed.a(:com.google.android.gms.dynamite_mapsdynamite#14799084#14.7.99 (100700-223214910):21)
at ed.run(:com.google.android.gms.dynamite_mapsdynamite#14799084#14.7.99 (100700-223214910):8)
2018-12-19 16:13:03.338 17295-17295/com.example.nik7.locationapp E/SchedPolicy: set_timerslack_ns write failed: Operation not permitted
2018-12-19 16:13:03.379 17295-17319/com.example.nik7.locationapp I/Process: Sending signal. PID: 17295 SIG: 9
This is the compelte log.I have even tried by removing the restrictions but that didn't work. Whats the issue here. I have also seledted api 23 marshmallow. I have done nothing except entering the api key in its place
EDIT: I also included the key in the manifest but still the app is crashing
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR_API_KEY"/>
EDIT:
Seems to be an issue in API 28
To fix it add this code under application in your manifest file:
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
Its probably because you dont have google play services installed. If you ran the app on your actual phone it would work just fine.
To fix it, you either add this line of code inside the in the manifest
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
Or
to upgrade your play-services-maps in build.gradle to
implementation 'com.google.android.gms:play-services-maps:16.1.0'
That worked for me
I am concerned what the System warning in my android app means.
ch.ethz.inf.vs.a4.minker.einz W/System: ClassLoader referenced unknown path: /data/app/ch.ethz.inf.vs.a4.minker.einz-1/lib/arm64
This warning comes up when I run the app and then don't do anything - just displaying the main Activity. The app does not crash, but I'd like to know why these warnings are showing up.
This is the complete logcat when I run the application on my Sony Xperia device, but the Emulator creates similar logs.
11-25 17:02:48.261 27908-27908/ch.ethz.inf.vs.a4.minker.einz I/art: Late-
enabling -Xcheck:jni
11-25 17:02:48.295 27908-27908/ch.ethz.inf.vs.a4.minker.einz W/System: ClassLoader referenced unknown path: /data/app/ch.ethz.inf.vs.a4.minker.einz-1/lib/arm64
11-25 17:02:48.319 27908-27908/ch.ethz.inf.vs.a4.minker.einz W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
11-25 17:02:48.400 27908-27936/ch.ethz.inf.vs.a4.minker.einz I/Adreno: QUALCOMM build : ce5aeb9, I750f7f2fa6
Build Date : 03/24/17
OpenGL ES Shader Compiler Version: XE031.09.00.03
Local Branch :
Remote Branch : quic/LA.BF64.1.2.3_rb1.11
Remote Branch : NONE
Reconstruct Branch : NOTHING
11-25 17:02:48.405 27908-27936/ch.ethz.inf.vs.a4.minker.einz I/OpenGLRenderer: Initialized EGL, version 1.4
11-25 17:02:48.406 27908-27936/ch.ethz.inf.vs.a4.minker.einz D/OpenGLRenderer: Swap behavior 1
11-25 17:02:48.435 27908-27908/ch.ethz.inf.vs.a4.minker.einz I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy#d84f7af time:215890379
Log on Emulator (Nexus 5 API 23 (Android 6.0, API23))
11-25 16:18:02.052 16216-16216/? I/art: Not late-enabling -Xcheck:jni (already on)
11-25 16:18:02.092 16216-16216/ch.ethz.inf.vs.a4.minker.einz W/System: ClassLoader referenced unknown path: /data/app/ch.ethz.inf.vs.a4.minker.einz-1/lib/x86
11-25 16:18:02.105 16216-16216/ch.ethz.inf.vs.a4.minker.einz W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
11-25 16:18:02.141 16216-16241/ch.ethz.inf.vs.a4.minker.einz D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
[ 11-25 16:18:02.153 16216:16216 D/ ]
HostConnection::get() New Host Connection established 0xab1a4140, tid 16216
11-25 16:18:02.227 16216-16241/ch.ethz.inf.vs.a4.minker.einz I/OpenGLRenderer: Initialized EGL, version 1.4
11-25 16:18:02.227 16216-16241/ch.ethz.inf.vs.a4.minker.einz W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
11-25 16:18:02.285 16216-16241/ch.ethz.inf.vs.a4.minker.einz D/EGL_emulation: eglCreateContext: 0xaee144e0: maj 3 min 1 rcv 4
11-25 16:18:02.298 16216-16241/ch.ethz.inf.vs.a4.minker.einz D/EGL_emulation: eglMakeCurrent: 0xaee144e0: ver 3 1 (tinfo 0xaee126f0)
11-25 16:18:02.299 16216-16241/ch.ethz.inf.vs.a4.minker.einz E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da
11-25 16:18:02.299 16216-16241/ch.ethz.inf.vs.a4.minker.einz E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008cdf
11-25 16:18:02.299 16216-16241/ch.ethz.inf.vs.a4.minker.einz E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008824
11-25 16:18:02.370 16216-16241/ch.ethz.inf.vs.a4.minker.einz D/EGL_emulation: eglMakeCurrent: 0xaee144e0: ver 3 1 (tinfo 0xaee126f0)
Log on Emulator Nexus 5X API 26 x86 (Android 8.0.0, API 26)
11-25 16:19:22.549 6786-6786/? I/zygote: Not late-enabling -Xcheck:jni (already on)
11-25 16:19:22.560 6786-6786/? W/zygote: Unexpected CPU variant for X86 using defaults: x86
11-25 16:19:22.730 6786-6804/ch.ethz.inf.vs.a4.minker.einz D/OpenGLRenderer: HWUI GL Pipeline
11-25 16:19:22.773 6786-6804/ch.ethz.inf.vs.a4.minker.einz I/OpenGLRenderer: Initialized EGL, version 1.4
11-25 16:19:22.773 6786-6804/ch.ethz.inf.vs.a4.minker.einz D/OpenGLRenderer: Swap behavior 1
11-25 16:19:22.773 6786-6804/ch.ethz.inf.vs.a4.minker.einz W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
11-25 16:19:22.773 6786-6804/ch.ethz.inf.vs.a4.minker.einz D/OpenGLRenderer: Swap behavior 0
11-25 16:19:22.783 6786-6804/ch.ethz.inf.vs.a4.minker.einz D/EGL_emulation: eglCreateContext: 0x989fda40: maj 3 min 1 rcv 4
11-25 16:19:22.811 6786-6804/ch.ethz.inf.vs.a4.minker.einz D/EGL_emulation: eglMakeCurrent: 0x989fda40: ver 3 1 (tinfo 0xa4a8b850)
11-25 16:19:22.812 6786-6804/ch.ethz.inf.vs.a4.minker.einz E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da
11-25 16:19:22.812 6786-6804/ch.ethz.inf.vs.a4.minker.einz E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da
11-25 16:19:22.812 6786-6804/ch.ethz.inf.vs.a4.minker.einz E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008cdf
11-25 16:19:22.812 6786-6804/ch.ethz.inf.vs.a4.minker.einz E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008cdf
11-25 16:19:22.812 6786-6804/ch.ethz.inf.vs.a4.minker.einz E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008824
11-25 16:19:22.812 6786-6804/ch.ethz.inf.vs.a4.minker.einz E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008824
11-25 16:19:22.884 6786-6804/ch.ethz.inf.vs.a4.minker.einz D/EGL_emulation: eglMakeCurrent: 0x989fda40: ver 3 1 (tinfo 0xa4a8b850)
This answer mentioned disabling instantRun, which I have already done because of my version of IntelliJ not supporting the latest version of gradle yet (last time I checked with support). It also mentions WiFi, but that doesn't seem to make a difference.
This answer mentions clearing app cache and data, but this also does not make a difference.
It might be worth mentioning that the first time I run the app, IntelliJ shows the following error in the logcat. This happens both on the emulator and my real device. With "the first time", I mean that it does not show the error when I click run again and select "restart app". This behaviour is not 100% consistent though.
11-25 16:14:41.358 14185-14185/? I/art: Not late-enabling -Xcheck:jni (already on)
11-25 16:14:41.371 14185-14189/? E/art: Failed sending reply to debugger: Broken pipe
11-25 16:14:41.371 14185-14189/? I/art: Debugger is no longer active
11-25 16:14:41.403 14185-14185/? W/System: ClassLoader referenced unknown path: /data/app/ch.ethz.inf.vs.a4.minker.einz-2/lib/x86
What could be reasons for these warnings? I am afraid that if I ignore them, I will at some point spend days debugging only to find out that these warnings would have told me.
you need to set the flag of intent.
Intent intent = new Intent(context,Route.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
I have an adview in one of my activitites. When I go to this activity, I get a dialog on the emulator telling me Chrome has stopped and the ad doesn't show anything.
I've checked over the code itself and I'm fairly sure it matches what it should -
Activity.xml
<com.google.android.gms.ads.AdView
android:id="#+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
ads:adSize="BANNER"
ads:adUnitId="#string/banner_ad_unit_id"></com.google.android.gms.ads.AdView>
Activity.java
mAdView = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
Here is the logcat -
09-08 09:26:47.779 5777-5777/? D/EGL_emulation: eglCreateContext: 0x872ca5e0: maj 2 min 0 rcv 2
09-08 09:26:47.783 5777-5777/? D/EGL_emulation: eglMakeCurrent: 0x872ca5e0: ver 2 0 (tinfo 0x8379e7b0)
09-08 09:26:47.784 5892-5892/? E/asset: setgid: Operation not permitted
09-08 09:26:47.795 5878-5878/? W/ResourceType: Entry identifier 0xc is larger than entry count 0x8
09-08 09:26:47.795 5878-5878/? D/AndroidRuntime: Shutting down VM
09-08 09:26:47.795 5878-5878/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.chrome:sandboxed_process0, PID: 5878
android.content.res.Resources$NotFoundException: Array resource ID #0x7f03000c
at android.content.res.Resources.obtainTypedArray(Resources.java:617)
at android.content.res.Resources.preloadFonts(Resources.java:379)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5815)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.WebViewZygoteInit.main(WebViewZygoteInit.java:121)
09-08 09:26:47.799 1584-1600/? I/ActivityManager: Showing crash dialog for package com.androidandyuk.autobuddy u0
09-08 09:26:47.825 1357-1357/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 4096
09-08 09:26:47.826 1584-2280/? I/OpenGLRenderer: Initialized EGL, version 1.4
09-08 09:26:47.826 1584-2280/? D/OpenGLRenderer: Swap behavior 1
09-08 09:26:47.826 1584-2280/? W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
09-08 09:26:47.826 1584-2280/? D/OpenGLRenderer: Swap behavior 0
09-08 09:26:47.842 1357-1357/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 4096
09-08 09:26:47.842 1584-2280/? D/EGL_emulation: eglCreateContext: 0xa44a4be0: maj 2 min 0 rcv 2
09-08 09:26:47.848 1357-1357/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 4096
09-08 09:26:47.849 1584-2280/? D/EGL_emulation: eglMakeCurrent: 0xa44a4be0: ver 2 0 (tinfo
On my Pixel XL, it doesn't crash, but no ad is shown, so I guess something isn't right?
We had the same crash in our app. A temporary solution was to disable the use of the preloaded_fonts tag in AndroidManifest.xml.
There appears to be a bug in Android 8.0 Oreo at present as this does not happen in earlier API's.