Bhuvanesh BS

1

votes
1

answer
154

views

Could not find method leftShift() for arguments after updating studio 3.4

After updating studio 3.4 and Gradle version to 5.1.1 I got the error on my task as Could not find method leftShift() My task: task incrementBetaVersion
Bhuvanesh BS
3

votes
1

answer
40

views

Could not GET 'https://jcenter.bintray.com/com/google/' Received status code 502 from server: Bad Gateway

My project has no problem till yesterday. Today my team and I get the same problem while building the project. Could not GET 'https://jcenter.bintray.com/com/google/android/gms/play-services-location/maven-metadata.xml'. Received status code 502 from server: Bad Gateway I have no clue why this error...
Bhuvanesh BS
2

votes
2

answer
603

views

cannot resolve symbol '?selectableItemBackgroundBorderless'

I'm facing a strange issue. When I use following attributes that perfectly working and I can see the ripple effect in the device. android:foreground='?selectableItemBackgroundBorderless' android:background='?selectableItemBackgroundBorderless' But in IDE It shows an error cannot resolve symbol '?sel...
Bhuvanesh BS
2

votes
4

answer
585

views

Boolean extension function

When I try to create Extension Function to set Boolean true or false like the below. Boolean.setTrue(){ this = true } Boolean.setFalse(){ this = false } It says variable expected. How to achieve this.
Bhuvanesh BS
5

votes
1

answer
2k

views

only classes are allowed on the left hand side of a class literal

I know a lot of similar questions here in StackOverflow, but nothing solved mine. I have a generic data class: data class ServiceCall(val result: T?, val exception: String?, val pagination: String?, val stringResult: String?) I am trying to use like this: Gson().fromJson(json, ServiceCall::class.jav...
Bhuvanesh BS
12

votes
2

answer
4.8k

views

difference between kotlin also, apply, let, use, takeIf and takeUnless in Kotlin

I read many Kotlin documents about these items. But I can't understand so clearly. What is the use of Kotlin let, also, takeIf and takeUnless in detail? I need an example of each item. Please don't post the Kotlin documentation. I need a real-time example and use cases of these items.
Bhuvanesh BS
2

votes
4

answer
1.6k

views

Kotlin Realm: Class must declare a public constructor with no arguments if it contains custom constructors

I'm creating a Realm object in Kotlin. Realm Object: open class PurposeModel(var _id: Long?, var purposeEn: String?, var purposeAr: String?) : RealmObject() When I compile the above code I'm getting this error: error: Class 'PurposeModel' must declare a public constructor with no arguments if it con...
Bhuvanesh BS
44

votes
4

answer
20.1k

views

failed to find style 'cardView Style' in current theme

After updating support library version 27.1.0 Android Studio unable to render CardView. It shows error message as failed to find style 'cardView Style' in current theme But no error in compiling and no difference while seeing on the phone. I have reverted the support library version to 27.0.2 and i...
Bhuvanesh BS
14

votes
4

answer
1.5k

views

how to remove generatedJava from android studio 3.2

Android studio 3.2 I have migrated my project to android studio 3.2. After migration I see generatedJava folder in my Android folder structure. I don't have any use of it. How can I remove this generatedJava folder from Android Studio?
Bhuvanesh BS
8

votes
1

answer
285

views

Start new navigation without exiting from previous navigation in Google Map

I'm starting Google Map from my application to Navigate the user to some location. Here is my code. Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse('google.navigation:q=' + rideDetailsModel.getEndLatitude() + ',' + rideDetailsModel.getEndLongtitude())); startActivity(intent)...
Bhuvanesh BS
1

votes
1

answer
2.5k

views

onPostExecute in anko doAsync

I know there are two methods available to do AsyncTask in Anko library. doAsync() doAsyncResult() My question is both the above methods have onComplete() method. In both method's onComplete() there is no trace of result like AsyncTask.onPostExecute(). Example: doAsync { sdkServiceFactory.initSDKServ...
Bhuvanesh BS
1

votes
2

answer
267

views

Radio Button ripple cuts off

In the above image the Radio Button delivery ripple cuts off when clicking. I tried padding. But padding only applies for text not the button. I can able to get full ripple in the upper and lower sides by setting height to radio button but I'm unable to fix the ripple cuts in left side. My XML: How...
Bhuvanesh BS
8

votes
3

answer
4.5k

views

Original kapt is deprecated

I have changed Kotlin version to 1.2.30. After the update I unable to run the project. I got the below error message. Error:Execution failed for task ':app:compileDevDebugJavaWithJavac'. > app: Original kapt is deprecated. Please add 'apply plugin: 'kotlin-kapt'' to your build.gradle. How do I resol...
Bhuvanesh BS
0

votes
1

answer
199

views

QRCodeReaderView java.lang.RuntimeException:Fail to connect to camera service

I'm using QRCodeReaderView to scan Qr Code. I have searched about this issue, all solutions are related to permission. In my code, I'm starting camera after checking the permission. The issue is it asking for camera permission and also crashes the app got crashed. QrScanningFragment: public class Q...
Bhuvanesh BS