Error: E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted - java

I'm making an app that has a Google map in the home fragment. When I try to type a location It just give me this error E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted, I tried the solution Places.initialize(getApplicationContext(),YOUR API KEY); but didn't work, I tried <uses-library android:name="org.apache.http.legacy" android:required="false"/> but still there is nothing happen, it doesn't crash or anything it just close the text view and I can't do anything. I see the loactions on the map but I can't type a location to go to it or mark it.
dependencies
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta8'
implementation 'com.google.firebase:firebase-database:19.3.1'
implementation 'com.google.firebase:firebase-auth:19.3.2'
implementation 'com.google.firebase:firebase-storage:19.1.1'
implementation 'com.firebase:geofire-android:2.3.1'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-places:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
implementation 'com.google.android.gms:play-services-auth:18.0.0'
implementation 'com.facebook.android:facebook-login:5.13.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.stripe:stripe-android:13.1.3'
implementation 'com.github.bumptech.glide:glide:4.10.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.akexorcist:googledirectionlibrary:1.1.1'
implementation 'com.onesignal:OneSignal:3.9.1'
implementation 'com.google.android.libraries.places:places:2.3.0'
implementation "com.github.addisonelliott:SegmentedButton:3.1.5"
implementation 'com.paypal.sdk:paypal-android-sdk:2.16.0'
implementation 'com.google.android.libraries.places:places:2.3.0'
implementation 'com.github.rtchagas:pingplacepicker:1.1.2'
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
implementation 'androidx.multidex:multidex:2.0.1'
Android
android {
compileSdkVersion 29
buildToolsVersion '29.0.3'
defaultConfig {
applicationId "com.example.*********"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "2.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
useLibrary 'org.apache.http.legacy'
manifestPlaceholders = [onesignal_app_id : '********-****-*****-****-**********',
onesignal_google_project_number: 'REMOTE']
}
buildTypes {
release {
multiDexKeepFile file('multidex-config.txt')
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility '1.8'
targetCompatibility '1.8'
}}
Image for reference. Example of the error

Related

Map Fragment do not show Map details Android

I'm trying to implement the maps fragment in my application, but when I test the apps on the simulator, the map details do not show up(unlike other devices/emulators).
I'm using the Pixel 3 API 29 emulator to test the app
(build.gradle)
plugins {
id 'com.android.application'
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.G26.fitnessandnutritionbuddy"
minSdk 23
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment:2.5.2'
implementation 'androidx.navigation:navigation-ui:2.5.2'
implementation 'com.google.android.gms:play-services-maps:18.1.0'
implementation 'androidx.annotation:annotation:1.4.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.android.volley:volley:1.2.1'
implementation 'com.google.android.gms:play-services-location:21.0.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
(Here is an image of the issue)
I expected to see the details of the maps (this happens in a few devices), but in general, most devices that are used for testing the app have the same issue.

I am facing problem for adding "implementation 'com.firebaseui:firebase-ui-database:8.0.1" in android studio(java)

I am facing problem for adding "implementation 'com.firebaseui:firebase-ui-database:8.0.1" in android studio(java).if I try to add this dependency then i face this problem,"error reading C:\Users\sourov ahmed.gradle\caches\modules-2\files-2.1\io.reactivex.rxjava3\rxjava\3.0.2\e652ec63717b1a92509abc8dc884fca0da3a974c\rxjava-3.0.2.jar; zip END header not found
"
My gradle code:
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.example.andromart"
minSdk 21
targetSdk 32`
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.firebase:firebase-database:20.0.5'
implementation 'io.github.pilgr:paperdb:2.7.2'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.google.firebase:firebase-storage:20.0.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
implementation 'androidx.navigation:navigation-fragment:2.5.1'
implementation 'androidx.navigat[enter image description here][1]ion:navigation-ui:2.5.1'
implementation 'com.firebaseui:firebase-ui-database:8.0.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
Try deleting the corrupted cache. Invalidation caches and restart.

Execution failed for task ':openCVLibrary310:compileDebugAidl'

My build.gradle (app) looks like this. I am using opencV310 Library
android {
compileSdkVersion 29
defaultConfig {
applicationId "indidoc.pdf.converter"
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName '1'
multiDexEnabled true
renderscriptTargetApi 23
renderscriptSupportModeEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath true
}
}
}
sourceSets { main { jni.srcDirs = ['src/main/jni', 'src/main/jni/'] } }
sourceSets.main.jni.srcDirs = []
sourceSets.main.jniLibs.srcDirs = ['src/main/libs', 'src/main/jniLibs']
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
dataBinding {
enabled = true
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
defaultConfig{
vectorDrawables.useSupportLibrary = true
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.github.bumptech.glide:glide:3.6.1'
implementation project(':openCVLibrary310')
implementation 'com.rmtheis:tess-two:6.1.1'
implementation 'com.github.mthli:Knife:v1.1'
implementation 'com.google.zxing:core:3.3.3'
implementation 'us.feras.mdv:markdownview:1.1.0'
implementation 'com.github.ctodobom:drag-select-recyclerview:0.3.4.ctodobom.sections'
implementation 'com.github.nostra13:Android-Universal-Image-Loader:v1.9.5'
implementation 'com.github.ctodobom:FabToolbar:3c5f0e0ff1b6d5089e20b7da7157a604075ae943'
implementation 'com.afollestad.material-dialogs:core:0.8.5.9'
implementation 'com.jakewharton.timber:timber:4.1.2'
implementation 'com.itextpdf:itextg:5.5.9'
implementation 'com.balysv:material-ripple:1.0.2'
implementation 'com.jakewharton:butterknife:10.2.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'it.chengdazhi.styleimageview:styleimageview:1.0.4'
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
implementation 'com.facebook.android:audience-network-sdk:5.10.0'
implementation 'com.airbnb.android:lottie:3.0.7'
implementation 'com.itextpdf:itextg:5.5.10'
def room_version = "1.1.1"
implementation "android.arch.persistence.room:runtime:$room_version"
annotationProcessor "android.arch.persistence.room:compiler:$room_version"
implementation 'com.google.zxing:core:3.2.1'
implementation 'com.journeyapps:zxing-android-embedded:3.4.0'
implementation('com.github.thekhaeng:pushdown-anim-click:1.1.1') {
exclude group: 'com.android.support'
}
implementation 'com.github.ParkSangGwon:TedPicker:v1.0.10'
implementation 'com.android.support:multidex:2.0.1'
implementation 'com.github.barteksc:android-pdf-viewer:2.8.2'
implementation 'org.jsoup:jsoup:1.12.1'
}
The Error I am getting while building is
1 exception was raised by workers:
java.lang.RuntimeException: java.lang.RuntimeException: java.io.IOException: com.android.ide.common.process.ProcessException: Error while executing process C:\Users\Amit\AppData\Local\Android\Sdk\build-tools\29.0.2\aidl.exe with arguments {-pC:\Users\Amit\AppData\Local\Android\Sdk\platforms\android-29\framework.aidl
I am getting this error while debugging. Please put your suggestions where I am doing wrong. I have already me=ade some changes in build.gradle but it doesn't help.
Thank you.
You have to add openCV Library into your android studio project before implementing in build gradle. I think this link will help you understand. Integrating Your Android App with OpenCV Library

Google Cloud Speech to Text Error: java.lang.NoSuchMethodError: No virtual method build()Lcom/google/protobuf/GeneratedMessageLite;

I'm using Google Cloud Speech to text. For some reason, It works only the first time. After that, this error keeps appearing. I'm stuck.
java.lang.NoSuchMethodError: No virtual method
build()Lcom/google/protobuf/GeneratedMessageLite; in class
Lcom/google/cloud/speech/v1/RecognitionConfig$Builder; or its super
classes (declaration of
'com.google.cloud.speech.v1.RecognitionConfig$Builder'
build.gradle module app
apply plugin: 'com.android.application'
apply plugin: 'com.google.protobuf'
apply plugin: 'com.jakewharton.butterknife'
ext {
grpcVersion = '1.4.0' }
android {
compileSdkVersion 28
defaultConfig {
applicationId "app.android.com.colconvert"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.2'
} }
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.3.0'
}
plugins {
javalite {
artifact = "com.google.protobuf:protoc-gen-javalite:3.0.0"
}
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
}
}
generateProtoTasks {
all().each { task ->
task.plugins {
javalite {}
grpc {
// Options added to --grpc_out
option 'lite'
}
}
}
} }
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.intellij:annotations:+#jar'
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
// gRPC
implementation "io.grpc:grpc-okhttp:$grpcVersion"
// implementation "io.grpc:grpc-protobuf-lite:$grpcVersion"
implementation "io.grpc:grpc-stub:$grpcVersion"
implementation 'javax.annotation:javax.annotation-api:1.2'
protobuf 'com.google.protobuf:protobuf-java:3.3.1'
implementation group: 'com.google.api.grpc', name: 'grpc-google-cloud-speech-v1', version: '0.1.13'
// OAuth2 for Google API
implementation('com.google.auth:google-auth-library-oauth2-http:0.7.0') {
exclude module: 'httpclient'
}
implementation 'com.android.support:multidex:1.0.0'
}
I think there is a problem with the version that you are using. I would recommend using the latest version like the following.
implementation group: 'com.google.api.grpc', name: 'grpc-google-cloud-speech-v1', version: '1.10.0'
Hope that helps!

Google places search box disappear in my android app, is it my code?

I have the following code in a map activity :
PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)
getFragmentManager().findFragmentById(R.id.autocomplete_fragment);
autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {
#Override
public void onPlaceSelected(Place place) {
// TODO: Get info about the selected place.
destination = place.getName().toString();
}
#Override
public void onError(Status status) {
// TODO: Handle the error.
}
});
}
This is the XML fragment:
<fragment android:id="#+id/autocomplete_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment"/>
Here is my app build.gradle file :
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.site.test"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.firebase:firebase-database:16.1.0'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-storage:16.1.0'
implementation 'com.github.bumptech.glide:glide:4.0.0'
//implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.firebase:geofire-android:2.1.1'
implementation 'com.android.support:cardview-v7:21.0.+'
implementation 'com.google.android.gms:play-services-places:16.0.0'
//below added for testing
//implementation 'com.google.android.libraries.places:1.0.0'
`enter code here`}
apply plugin: 'com.google.gms.google-services'
Once the map activity is activated, I see the fragment search box in it's correct placement. Once I click it, the search box pop-up briefly appears then disappears, effectively stopping me from entering a location.
I have enabled the Google Places API, and it is correctly placed in my android manifest file.
This is what the logcat shows :
2019-03-04 00:58:55.090 6506-6506/com.site.test E/SchedPolicy: set_timerslack_ns write failed: Operation not permitted
Seems to be an issue in Places, try this
https://stackoverflow.com/a/55073542/11551260

Categories