NotificationChannel issue in Android O

As it is written in Android Documentation: https://developer.android.com/preview/features/notification-channels.html If you target Android O and post a notification without specifying a valid notifications channel, the notification fails to post and the system logs an error. To solve this issue you need to create a NotificationChannel. NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // The id of the channel. … Read more

Setting up Gradle for api 26 (Android)

Have you added the google maven endpoint? Important: The support libraries are now available through Google’s Maven repository. You do not need to download the support repository from the SDK Manager. For more information, see Support Library Setup. Add the endpoint to your build.gradle file: allprojects { repositories { jcenter() maven { url ‘https://maven.google.com’ } … Read more

Unable to resume activity with java.lang.IllegalArgumentException on Android api >=24

catch (Exception e) { if (!mInstrumentation.onException(r.activity, e)) { throw new RuntimeException( “Unable to resume activity ” + r.intent.getComponent().toShortString() + “: ” + e.toString(), e); } } it’s a chained exeption so inspect e.getCause() stacktrace -> till cause will be null if you’ll not find it look at the method in activity thread which invokes try … Read more

Android 8.0 Oreo crash on focusing TextInputEditText

I ran into this too. It turns out the issue was caused by setting the hint text on the EditText nested inside the TextInputLayout. I did some digging and found this nugget in the 26.0.0 Beta 2 release notes. Android Support Release Notes June 2017 TextInputLayout must set hints on onProvideAutofillStructure() That led me to … Read more

“Not enough information to infer parameter T” with Kotlin and Android

You must be using API level 26 (or above). This version has changed the signature of View.findViewById() – see here https://developer.android.com/about/versions/oreo/android-8.0-changes#fvbi-signature So in your case, where the result of findViewById is ambiguous, you need to supply the type: 1/ Change val listView = findViewById(R.id.list) as ListView to val listView = findViewById<ListView>(R.id.list) 2/ Change this.label = … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)