By continuing you indicate that you have read and agree to our Terms of service and Privacy policy
by bumptech Java Version: 4.11.0.10 License: Non-SPDX
by bumptech Java Version: 4.11.0.10 License: Non-SPDX
Support
Quality
Security
License
Reuse
kandi has reviewed glide and discovered the below as its top functions. This is intended to give you an instant insight into glide implemented functionality, and help decide if they suit your requirements.
Get all kandi verified functions for this library.
Get all kandi verified functions for this library.
An image loading and caching library for Android focused on smooth scrolling
QUESTION
Glide: How to resize and save the gif as file using Glide v4?
Asked 2022-Mar-23 at 09:44I want to resize the gif file and save it. I tried to use some suggested methods but those give error and later I came to know that some of methods are deprecated in Glide v4
byte[] bytes = Glide.with(context)
.asGif()
.load(url)
.toBytes()
.into(250, 250)
.submit()
.get();
In above code converting the arrays to file gives blank gif file with 4.x MB size
File file = Glide.with(reactContext)
.asFile()
.load(url)
.override(512, 512)
.fitCenter()
.into(512,512)
.get();
And
File file = Glide.with(reactContext)
.asFile()
.load(url)
.apply(new RequestOptions().override(512, 512))
// .diskCacheStrategy(DiskCacheStrategy.ALL)
.submit(512,512)
.get();
And
File file = Glide.with(reactContext)
.asFile()
.load(url)
// .override(512, 512)
.fitCenter()
.submit(512,512)
.get();
But the above code keeps the width and height as it is
Details:
Glide version : 4.13.0
Please share the proper code or suggest something to resize the gif (to save as file rather displaying).
ANSWER
Answered 2022-Mar-23 at 09:44Glide
can not only load files, but also download them. And that is what you want. You can just use this code and it will be downloaded.
Glide.with(MainActivity.this).asFile()
.load(url)
.apply(new RequestOptions()
.format(DecodeFormat.PREFER_ARGB_8888)
.override(Target.SIZE_ORIGINAL)) // you can also give your size here
.into(new Target<File>() {
@Override
public void onStart() {
}
@Override
public void onStop() {
}
@Override
public void onDestroy() {
}
@Override
public void onLoadStarted(@Nullable Drawable placeholder) {
}
@Override
public void onLoadFailed(@Nullable Drawable errorDrawable) {
}
@Override
public void onResourceReady(@NonNull File resource, @Nullable Transition<? super File> transition) {
storeImage(resource);
}
@Override
public void onLoadCleared(@Nullable Drawable placeholder) {
}
@Override
public void getSize(@NonNull SizeReadyCallback cb) {
}
@Override
public void removeCallback(@NonNull SizeReadyCallback cb) {
}
@Override
public void setRequest(@Nullable Request request) {
}
@Nullable
@Override
public Request getRequest() {
return null;
}
});
The storeImage
method:
private void storeImage(File image) {
File pictureFile = getOutputMediaFile();
if (pictureFile == null) {
return;
}
try {
FileOutputStream output = new FileOutputStream(pictureFile);
FileInputStream input = new FileInputStream(image);
FileChannel inputChannel = input.getChannel();
FileChannel outputChannel = output.getChannel();
inputChannel.transferTo(0, inputChannel.size(), outputChannel);
output.close();
input.close();
Toast.makeText(MainActivity.this, "Image Downloaded", Toast.LENGTH_SHORT).show();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
private File getOutputMediaFile() {
File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/Diwali Images"); // change the folder name according to your needs.
if (!mediaStorageDir.exists()) {
if (!mediaStorageDir.mkdirs())
return null;
}
File mediaFile;
mediaFile = new File(mediaStorageDir.getPath() + File.separator + "IMG_SHUBH_DIWALI_"+Calendar.getInstance().getTimeInMillis() +".gif"); // change the name of the file according to your wish
return mediaFile;
}
I have actually found out 1 library for that. In that library, I found this class interesting. Here, in the constructor we can pass the width and height and then we can save it.
QUESTION
How do I " SDK 30 and Android 10" in Android Studio?
Asked 2022-Mar-09 at 20:12When I update the project, this message appears in Android Studio, I want to build the project in the environment "SDK 30 and Android 10", But I don't know how to do it.
gradle wrapper properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
build gradle project
buildscript {
repositories {
google()
jcenter() }
dependencies { classpath 'com.android.tools.build:gradle:3.4.3' }}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build gradle App
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion "30.0.0"
defaultConfig {
applicationId "com.demo.codev2"
minSdkVersion 21
targetSdkVersion 30
multiDexEnabled true
versionCode 1
versionName "1.0"
renderscriptTargetApi 18
renderscriptSupportModeEnabled true
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
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'com.android.support:support-annotations:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.victor:lib:1.0.4'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'me.iwf.photopicker:PhotoPicker:0.9.12@aar'
implementation 'com.google.android.material:material:1.2.1'
implementation 'com.wang.avi:library:2.1.3'
implementation 'com.github.chrisbanes:PhotoView:2.0.0'
implementation 'com.github.krokyze:ucropnedit:2.2.1-native'
implementation 'com.github.duanhong169:colorpicker:1.1.6'
}
When I update the project, this message appears in Android Studio, I want to build the project in the environment "SDK 30 and Android 10", But I don't know how to do it.
Thank you
ANSWER
Answered 2022-Mar-09 at 17:59QUESTION
How to isolate conditional panels from other conditional panels when axis scroll involves one panel and not the other?
Asked 2022-Mar-07 at 10:42In the below reproducible code, two main conditional panels are presented: "Stratification" and "DnL balances". The first presents a smaller data table where no scroll bars are automatically introduced, and the 2nd presents a larger data table where scroll bars are introduced.
The scroll bars in one conditional panel appear to be affecting the other conditional panel. I have tried addressing with style = "display: none;"
(based on a related post yesterday), flagged with ### in this reproducible code, but it leaves the 2nd conditional panel without the glide/well panel across the top unless the user adjusts the size of the window, however minutely. Yesterday's posted solution worked fine, but that code didn't render a data table. When introducing a data table and resulting scroll bars, the issue manifests.
Is there a way to resolve this? May be a hack, but even a tiny automated adjustment to the size of the window may help?
The images at the bottom better explain the issue.
library(shiny)
library(shinyglide)
library(shinyjs)
library(shinyWidgets)
ui <-
fluidPage(
useShinyjs(),
tags$style(".glide-controls { position: absolute; top: 8px; right: 14px; width: 160px; }"),
titlePanel("Hello"),
sidebarLayout(
sidebarPanel(selectInput("selectData", h5(strong("Select data to view:")),choices = list("Stratification","DnL balances"),selected = "Stratification")),
mainPanel(
tabsetPanel(
tabPanel("Private data", value = 1,
div(style = "margin-top:10px"),
conditionalPanel(condition = "input.selectData == 'Stratification'",
fluidRow(
column(12,
glide(
custom_controls = div(class = "glide-controls", glideControls()),
screen(
wellPanel(
radioButtons(
inputId = 'groupStrats',
label = NULL,
choiceNames = c('Calendar period','MOB'),
choiceValues = c('Period','MOB'),
selected = 'Period',
inline = TRUE),
style = "padding-top: 12px; padding-bottom: 0px;")
),
screen(
wellPanel(
radioButtons(
inputId = 'stratsView',
label = NULL,
choices = list("Table view" = 1,"Plot view" = 2),
selected = 1,
inline = TRUE),
style = "padding-top: 12px; padding-bottom: 0px;")
)
)
)
),
fluidRow(tableOutput("mtCarsPart")),
conditionalPanel(condition = "input.stratsView == 2", style = "display: none;", fluidRow(column(12, plotOutput("stratPlot"))))
),
### comment out "style..." in line below to see the issue ###
conditionalPanel(condition = "input.selectData == 'DnL balances'", style = "display: none;",
fluidRow(
column(12,
glide(
custom_controls = div(class = "glide-controls", glideControls()),
screen(
wellPanel(
radioButtons(
inputId = 'groupBal',
label = NULL,
choiceNames = c('Calendar period','MOB'),
choiceValues = c('Period','MOB'),
selected = 'Period',
inline = TRUE),
style = "padding-top: 12px; padding-bottom: 0px;")
),
screen(
wellPanel(
radioButtons(
inputId = 'balView',
label = NULL,
choices = list("Table view" = 1,"Plot view" = 2),
selected = 1,
inline = TRUE),
style = "padding-top: 12px; padding-bottom: 0px;")
)
)
)
),
fluidRow(tableOutput("mtCarsFull"))
)
), id = "tabselected"
)
)
)
)
server <- function(input, output, session) {
output$mtCarsFull <- renderTable(mtcars)
output$mtCarsPart <- renderTable(mtcars[1:10,1:3])
}
shinyApp(ui, server)
ANSWER
Answered 2022-Mar-07 at 10:42Edit: The dev-version is already fixed:
remotes::install_github("juba/shinyglide")
should resolve the issue.
Initial answer:
Regarding shinyglide's behaviour I filed an issue here.
Using library(DT)
you could avoid the long output which leads to the vertical scrollbar:
library(DT)
library(shiny)
library(shinyjs)
library(shinyglide)
library(shinyWidgets)
ui <- fluidPage(
useShinyjs(),
tags$style(".glide-controls { position: absolute; top: 8px; right: 14px; width: 160px; }"),
titlePanel("Hello"),
sidebarLayout(
sidebarPanel(selectInput("selectData", h5(strong("Select data to view:")), choices = list("Stratification","DnL balances"), selected = "Stratification")),
mainPanel(
tabsetPanel(
tabPanel("Private data", value = 1,
div(style = "margin-top:10px"),
fluidRow(
column(12,
conditionalPanel(condition = "input.selectData == 'Stratification'",
glide(
custom_controls = div(class = "glide-controls", glideControls()),
shinyglide::screen(
wellPanel(
radioButtons(
inputId = 'groupStrats',
label = NULL,
choiceNames = c('Calendar period','MOB'),
choiceValues = c('Period','MOB'),
selected = 'Period',
inline = TRUE),
style = "padding-top: 12px; padding-bottom: 0px;")
),
shinyglide::screen(
wellPanel(
radioButtons(
inputId = 'stratsView',
label = NULL,
choices = list("Table view" = 1,"Plot view" = 2),
selected = 1,
inline = TRUE),
style = "padding-top: 12px; padding-bottom: 0px;")
)
),
DTOutput("mtCarsPart"),
conditionalPanel(condition = "input.stratsView == 2", style = "display: none;", fluidRow(column(12, plotOutput("stratPlot"))))
),
conditionalPanel(condition = "input.selectData == 'DnL balances'",
glide(
custom_controls = div(class = "glide-controls", glideControls()),
shinyglide::screen(
wellPanel(
radioButtons(
inputId = 'groupBal',
label = NULL,
choiceNames = c('Calendar period','MOB'),
choiceValues = c('Period','MOB'),
selected = 'Period',
inline = TRUE),
style = "padding-top: 12px; padding-bottom: 0px;")
),
shinyglide::screen(
wellPanel(
radioButtons(
inputId = 'balView',
label = NULL,
choices = list("Table view" = 1,"Plot view" = 2),
selected = 1,
inline = TRUE),
style = "padding-top: 12px; padding-bottom: 0px;")
)
),
DTOutput("mtCarsFull")
)
)
)
), id = "tabselected"
)
)
)
)
server <- function(input, output, session) {
output$mtCarsFull <- renderDT(mtcars)
output$mtCarsPart <- renderDT(mtcars[1:10,1:3])
}
shinyApp(ui, server)
QUESTION
A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction?java.lang.reflect.Invocation?
Asked 2022-Mar-06 at 10:01when I run android application in real device I am getting following gradle errors
Execution failed for task ':common:kaptDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction
> java.lang.reflect.InvocationTargetException (no error message)
below my app.gradle
plugins {
id 'com.android.application'
id 'kotlin-android'
}
apply plugin: 'androidx.navigation.safeargs.kotlin'
apply plugin: 'kotlin-kapt'
apply from: '../commons.gradle'
android {
compileSdkVersion 30
buildFeatures {
dataBinding = true
// for view binding:
// viewBinding = true
}
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.androidcodingchallenge"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables{
useSupportLibrary = true
}
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
dependencies {
implementation project(':data')
implementation project(':domain')
implementation project(':presentation')
implementation project(':remote')
implementation project(':cache')
implementation project(':common')
implementation project(':device')
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation "com.google.android.material:material:$material_version"
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
//navigation component
// implementation "androidx.navigation:navigation-fragment-ktx:2.3.2"
// implementation "androidx.navigation:navigation-ui-ktx:2.3.2"
// UI
implementation "com.github.bumptech.glide:glide:$glide_version"
kapt "com.github.bumptech.glide:compiler:$glide_version"
// Ktx
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.3.0"
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0'
implementation "androidx.fragment:fragment-ktx:1.3.0"
// Navigation
implementation "android.arch.navigation:navigation-fragment-ktx:$version_navigation"
implementation "android.arch.navigation:navigation-ui-ktx:$version_navigation"
//viewpager2
implementation "androidx.viewpager2:viewpager2:1.0.0"
implementation 'com.thoughtbot:expandablerecyclerview:1.3'
implementation 'com.thoughtbot:expandablecheckrecyclerview:1.4'
//indicator
implementation 'me.relex:circleindicator:2.1.4'
//lottie
implementation "com.airbnb.android:lottie:3.4.1"
//datastore
implementation "androidx.datastore:datastore-preferences:1.0.0-alpha06"
implementation 'androidx.hilt:hilt-navigation-fragment:1.0.0-alpha03'
//LeakCanary
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakcanary_version"
//Retrofit
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'
//multidex
implementation 'com.android.support:multidex:1.0.3'
}
below commons.gradle
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'dagger.hilt.android.plugin'
androidExtensions {
experimental = true
}
android {
// compileSdkVersion Versions.compileSdkVersion
// buildToolsVersion Versions.buildTool
// defaultConfig {
// minSdkVersion Versions.minSdk
// targetSdkVersion Versions.targetSdk
// versionCode Releases.versionCode
// versionName Releases.versionName
// vectorDrawables.useSupportLibrary = true
// }
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
kapt {
javacOptions {
// Increase the max count of errors from annotation processors.
// Default is 100.
option("-Xmaxerrs", 500)
}
// Configure kapt to correct error types for Hilt
correctErrorTypes true
}
buildFeatures{
dataBinding = true
}
kotlinOptions {
jvmTarget = "1.8"
}
lintOptions {
abortOnError false
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}
dependencies {
//Loads packaged libraries in the libs folder
implementation fileTree(dir: 'libs', include: ['*.jar'])
// implementation KotlinLibraries.kotlin
// implementation AndroidLibraries.coreKtx
//
// implementation Libraries.hilt
// implementation Libraries.hiltJetpack
// kapt Libraries.hiltCompiler
// kapt Libraries.hiltJetpackCompiler
//
// // For instrumentation tests
// androidTestImplementation Libraries.hiltAndroidTest
// kaptAndroidTest Libraries.hiltAndroidTestCompiler
//
// // For local unit tests
// testImplementation Libraries.hiltAndroidUnitTest
// kaptTest Libraries.hiltAndroidUnitTestCompiler
//
// implementation TestLibraries.androidTestRunner
// implementation TestLibraries.junit
// implementation TestLibraries.espresso
// implementation TestLibraries.espressoContrib
// Concurrency
implementation "io.reactivex.rxjava2:rxkotlin:$rxkotlin_version"
implementation "io.reactivex.rxjava2:rxandroid:$rxandroid_version"
//Hilt
implementation "com.google.dagger:hilt-android:$hilt_version"
kapt "com.google.dagger:hilt-android-compiler:$hilt_version"
implementation "androidx.hilt:hilt-lifecycle-viewmodel:$hilt_androidx_version"
kapt "androidx.hilt:hilt-compiler:$hilt_androidx_version"
// Utils
implementation "com.jakewharton.threetenabp:threetenabp:$threetenabp_version"
}
below build.gradle file
buildscript {
ext{
kotlin_version = "1.4.20"
version_navigation = "2.3.5"
hilt_version = '2.31.2-alpha'
version_navigation = "2.3.5"
version_lifecycle_extensions = "2.2.0"
lifecycle_version = "2.2.0"
hilt_androidx_version = "1.0.0-alpha03"
material_version = "1.3.0"
coroutines_version = "1.4.1"
junit_version = "4.13"
retrofit_version = "2.9.0"
okHttp_version = "4.9.0"
moshi_converter_version = '2.9.0'
moshi_version = '1.11.0'
mockwebserver_version = "4.9.0"
robolectric_version = "4.4"
mockito_version = "3.5.15"
google_truth_version = "1.0"
coroutines_test = "1.3.1"
room_version = "2.3.0"
threetenabp_version = "1.2.4"
leakcanary_version = "2.4"
timber_version = "4.7.1"
glide_version = "4.11.0"
androidsvg_version = "1.4"
rxkotlin_version = "2.4.0"
rxandroid_version = "2.1.1"
google_services_version = "4.3.8"
}
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$version_navigation"
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.gms:google-services:$google_services_version"
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
flatDir {
dirs 'libs'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
what I have tried invalide cache restart
followed this issue tracker I have tried all suggested answer overthere it did not solve my problem ,Besides that, I run gradlew clean in android studio and it is giving following errors FAILURE: Build completed with 2 failures.
1: Task failed with an exception.A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction java.lang.reflect.InvocationTargetException (no error message)
A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction java.lang.reflect.InvocationTargetException (no error message)
note that I am using Android Studio Arctic Fox
I want to know where exactly I am making mistake
ANSWER
Answered 2021-Aug-21 at 12:15I fixed it my problem by updating current kotlin version to latest version and moshi version to 1.12.0
QUESTION
How to resolve NullPointerException on HttpURLConnection?
Asked 2022-Mar-06 at 02:06I am developing an Android application, using ExoPlayer for video playback, Glide for image display, and a download library for file download, and they all have NullPointerException related to HttpURLConnection, I'm sure the link used is available.
The magic is, I just follow these library's The method described in the official documentation loads the data normally, and this error occurs from time to time, and the three libraries may not throw NullPointerException at the same time, and I don't even know how to reproduce this problem.
This is the error thrown by ExoPlayer, which prevents the video from loading:
E/LoadTask: Unexpected exception loading stream
java.lang.NullPointerException: wrapped.getHeaderField(key) must not be null
at com.android.tools.appinspection.network.httpurl.TrackedHttpURLConnection.getHeaderField(TrackedHttpURLConnection.kt:317)
at com.android.tools.appinspection.network.httpurl.HttpsURLConnectionWrapper.getHeaderField(HttpsURLConnectionWrapper.kt:182)
at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.isCompressed(DefaultHttpDataSource.java:829)
at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:413)
at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84)
at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1009)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:412)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
The video playback part of the code is as follows:
val factory = ProgressiveMediaSource.Factory(
DefaultHttpDataSource.Factory()
)
val mediaSource = arrayListOf<MediaSource>(
factory.createMediaSource(MediaItem.fromUri(video.base_url)),
factory.createMediaSource(MediaItem.fromUri(audio.base_url))
)
val media = MergingMediaSource(true, *mediaSource.toTypedArray())
ViewModel.getPlayer()?.let { player ->
player.setMediaSource(media)
player.prepare()
}
And this is the error thrown by Aria, which cause software to crash:
E/AndroidRuntime: FATAL EXCEPTION: pool-5-thread-2
Process: io.github.sgpublic.bilidownload, PID: 22400
java.lang.NullPointerException: wrapped.getRequestProperty(field) must not be null
at com.android.tools.appinspection.network.httpurl.TrackedHttpURLConnection.getRequestProperty(TrackedHttpURLConnection.kt:235)
at com.android.tools.appinspection.network.httpurl.HttpsURLConnectionWrapper.getRequestProperty(HttpsURLConnectionWrapper.kt:274)
at com.arialyy.aria.http.ConnectionHelp.setConnectParam(ConnectionHelp.java:146)
at com.arialyy.aria.http.download.HttpDFileInfoTask.run(HttpDFileInfoTask.java:82)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
I have tried Invalidate and Restart, and even uninstalled and reinstalled Android Studio completely, but the problem still cannot be solved, so what is the problem?
ANSWER
Answered 2022-Mar-06 at 02:06I found the related entry, and to sum it up this is a bug in the TrackedHttpURLConnection implementation, the fix will be capped around mid-late March.
Update: (Mar 4, 2022 07:09AM)
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
Android Studio Dolphin Canary 5 (2021.3.1.5)
Android Gradle Plugin 7.3.0-alpha05
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
QUESTION
How to isolate conditional panels from other conditional panels?
Asked 2022-Mar-03 at 10:49I'm having trouble with the formats of conditional panels affecting other conditional panels. Below is reproducible code, and at the bottom are images better explaining the issue. In the fuller App this code derives from, the problem is more obvious and makes it look sloppy (in the fuller App, there are multiple screens the user clicks through as the user scrolls to the right along the shaded bar (Well Panel) at the top just underneath the tab label, and the misalignment gets more pronounced as the user scrolls to the right).
The problem is: as the user scrolls right through the Glide Controls / Well Panels to make selections, the Well Panels (at the top with radio buttons) begin to misalign with the table and/or plots that appear beneath. The misalignment gets more pronounced as the user scrolls right. This misalignment isn't as apparent in this reproducible example, but is more pronounced in the fuller App this derives from where there are multiple "screens" or Well Panels at the top for the user to scroll through and where there are data tables and/or plots presented underneath in the main panel.
For sake of simplicity all server code is eliminated in this example (no plots, no tables), as the issue still presents without the server code.
If I comment-out other conditional panels (marked "###" in the reproducible code) the misalignment goes away. So how can I make the conditional panels independent of one another, as a way of eliminating this misalignment? I'm open to any other suggestions for eliminating this misalignment.
The basic structure of the App is the user makes "big choices" along the sidebar panel, and makes more "refined choices" only the top bar underneath the tab label using Glide Controls/Well Panels etc. for a carousel affect.
Reproducible code:
library(shiny)
library(shinyglide)
library(shinyjs)
library(shinyWidgets)
ui <-
fluidPage(
useShinyjs(),
tags$style(".glide-controls { position: absolute; top: 8px; right: 14px; width: 160px; }"),
titlePanel("Hello"),
sidebarLayout(
sidebarPanel(selectInput("selectData", h5(strong("Select data to view:")),choices = list("Stratification","DnL balances"),selected = "Stratification")),
mainPanel(
tabsetPanel(
tabPanel("Private data", value = 1,
div(style = "margin-top:10px"),
conditionalPanel(condition = "input.selectData == 'Stratification'",
fluidRow(
column(12,
glide(
custom_controls = div(class = "glide-controls", glideControls()),
screen(
wellPanel(
radioButtons(
inputId = 'groupStrats',
label = NULL,
choiceNames = c('Calendar period','MOB'),
choiceValues = c('Period','MOB'),
selected = 'Period',
inline = TRUE),
style = "padding-top: 12px; padding-bottom: 0px;")
),
screen(
wellPanel(
radioButtons(
inputId = 'stratsView',
label = NULL,
choices = list("Table view" = 1,"Plot view" = 2),
selected = 1,
inline = TRUE),
style = "padding-top: 12px; padding-bottom: 0px;")
)
)
)
),
### Deleting next line resolves the well panel issue ###
conditionalPanel(condition = "input.stratsView == 2",fluidRow(column(12, plotOutput("stratPlot"))))
),
### Deleting the following conditional panel also resolves the well panel issue ###
conditionalPanel(condition = "input.selectData == 'DnL balances'",
fluidRow(
column(12,
glide(
custom_controls = div(class = "glide-controls", glideControls()),
screen(
wellPanel(
radioButtons(
inputId = 'groupBal',
label = NULL,
choiceNames = c('Calendar period','MOB'),
choiceValues = c('Period','MOB'),
selected = 'Period',
inline = TRUE),
style = "padding-top: 12px; padding-bottom: 0px;")
)
)
)
)
), # closes conditional panel
### Deleting the following conditional panel (or either checkbox... or selectize...) also resolves the well panel issue ###
conditionalPanel(condition = "input.selectData == 'Level 1 data'",
panel(
checkboxGroupInput(
inputId = "vars",
label = "Filter by (default view is all data):",
choices = c("Period", "MOB"),
selected = c("Period", "MOB"),
inline = TRUE),
selectizeGroupUI(
id = "my-filters",
params = list(Period = list(inputId = "Period", title = "Period:"),
MOB = list(inputId = "MOB", title = "MOB:"))
), # closes above selectize...
status = "primary"
)
) # closes conditional panel
), id = "tabselected"
)
)
)
)
server <- function(input, output, session) {}
shinyApp(ui, server)
ANSWER
Answered 2022-Mar-03 at 10:49Actually this is the same issue as here.
The conditionalPanel
s are visible for a very short time when first invoking the app.
This causes a vertical scrollbar to appear and leads to the misalignment.
Use style = "display: none;"
to render the conditionalPanel
s hidden on startup (where needed) and please leave a thumbs up or other feedback here.
library(shiny)
library(shinyjs)
library(shinyglide)
library(shinyWidgets)
ui <-
fluidPage(
useShinyjs(),
tags$style(".glide-controls { position: absolute; top: 8px; right: 14px; width: 160px; }"),
titlePanel("Hello"),
sidebarLayout(
sidebarPanel(selectInput("selectData", h5(strong("Select data to view:")),choices = list("Stratification","DnL balances"),selected = "Stratification")),
mainPanel(
tabsetPanel(
tabPanel("Private data", value = 1,
div(style = "margin-top:10px"),
conditionalPanel(condition = "input.selectData == 'Stratification'",
fluidRow(
column(12,
glide(
custom_controls = div(class = "glide-controls", glideControls()),
screen(
wellPanel(
radioButtons(
inputId = 'groupStrats',
label = NULL,
choiceNames = c('Calendar period','MOB'),
choiceValues = c('Period','MOB'),
selected = 'Period',
inline = TRUE),
style = "padding-top: 12px; padding-bottom: 0px;")
),
screen(
wellPanel(
radioButtons(
inputId = 'stratsView',
label = NULL,
choices = list("Table view" = 1,"Plot view" = 2),
selected = 1,
inline = TRUE),
style = "padding-top: 12px; padding-bottom: 0px;")
)
)
)
),
### Deleting next line resolves the well panel issue ###
conditionalPanel(condition = "input.stratsView == 2", style = "display: none;", fluidRow(column(12, plotOutput("stratPlot"))))
),
### Deleting the following conditional panel also resolves the well panel issue ###
conditionalPanel(condition = "input.selectData == 'DnL balances'", style = "display: none;",
fluidRow(
column(12,
glide(
custom_controls = div(class = "glide-controls", glideControls()),
screen(
wellPanel(
radioButtons(
inputId = 'groupBal',
label = NULL,
choiceNames = c('Calendar period','MOB'),
choiceValues = c('Period','MOB'),
selected = 'Period',
inline = TRUE),
style = "padding-top: 12px; padding-bottom: 0px;")
)
)
)
)
), # closes conditional panel
### Deleting the following conditional panel (or either checkbox... or selectize...) also resolves the well panel issue ###
conditionalPanel(condition = "input.selectData == 'Level 1 data'", style = "display: none;",
panel(
checkboxGroupInput(
inputId = "vars",
label = "Filter by (default view is all data):",
choices = c("Period", "MOB"),
selected = c("Period", "MOB"),
inline = TRUE),
selectizeGroupUI(
id = "my-filters",
params = list(Period = list(inputId = "Period", title = "Period:"),
MOB = list(inputId = "MOB", title = "MOB:"))
), # closes above selectize...
status = "primary"
)
) # closes conditional panel
), id = "tabselected"
)
)
)
)
server <- function(input, output, session) {}
shinyApp(ui, server)
QUESTION
Could not resolve com.google.guava:guava:30.1-jre - Gradle project sync failed. Basic functionality will not work properly - in kotlin project
Asked 2022-Feb-14 at 19:47It was a project that used to work well in the past, but after updating, the following errors appear.
plugins {
id 'com.android.application'
id 'kotlin-android'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.retrofit_test"
minSdkVersion 21
targetSdkVersion 30
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
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
// implementation 'com.google.guava:guava:30.1.1-jre'
implementation 'com.google.guava:guava:30.1-jre'
// implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.5.30-M1'
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.google.code.gson:gson:2.8.7'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1'
implementation 'com.github.bumptech.glide:glide:4.12.0'
implementation 'android.arch.persistence.room:guava:1.1.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
If we need more source code to check, I will update it.
The error contents are as follows.
A problem occurred configuring root project 'Retrofit_Test'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.30/kotlin-gradle-plugin-1.5.30.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project :
Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.4.32/kotlin-stdlib-jdk8-1.4.32.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:repository:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:aaptcompiler:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.analytics-library:shared:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.lint:lint-model:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > androidx.databinding:databinding-compiler-common:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-host-retention-proto:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder-model:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:gradle-api:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2 > com.android.tools:common:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.analytics-library:tracker:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.build:manifest-merger:30.0.2
Could not find org.apache.httpcomponents:httpmime:4.5.6.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/apache/httpcomponents/httpmime/4.5.6/httpmime-4.5.6.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdklib:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.analytics-library:crash:30.0.2
Could not find commons-io:commons-io:2.4.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/commons-io/commons-io/2.4/commons-io-2.4.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > androidx.databinding:databinding-compiler-common:7.0.2
Could not find org.ow2.asm:asm:7.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/ow2/asm/asm/7.0/asm-7.0.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:gradle-api:7.0.2
Could not find org.ow2.asm:asm-analysis:7.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/ow2/asm/asm-analysis/7.0/asm-analysis-7.0.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
Could not find org.ow2.asm:asm-commons:7.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/ow2/asm/asm-commons/7.0/asm-commons-7.0.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
Could not find org.ow2.asm:asm-util:7.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/ow2/asm/asm-util/7.0/asm-util-7.0.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
Could not find org.bouncycastle:bcpkix-jdk15on:1.56.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/bouncycastle/bcpkix-jdk15on/1.56/bcpkix-jdk15on-1.56.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.build:apkzlib:7.0.2
Could not find org.glassfish.jaxb:jaxb-runtime:2.3.2.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/glassfish/jaxb/jaxb-runtime/2.3.2/jaxb-runtime-2.3.2.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdklib:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:repository:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > androidx.databinding:databinding-compiler-common:7.0.2
Could not find net.sf.jopt-simple:jopt-simple:4.9.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
Could not find com.squareup:javapoet:1.10.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/squareup/javapoet/1.10.0/javapoet-1.10.0.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > androidx.databinding:databinding-compiler-common:7.0.2
Could not find com.google.protobuf:protobuf-java:3.10.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/protobuf/protobuf-java/3.10.0/protobuf-java-3.10.0.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.ddms:ddmlib:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:aapt2-proto:7.0.2-7396180
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:aaptcompiler:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-device-provider-gradle-proto:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-host-retention-proto:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:bundletool:1.6.0
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.analytics-library:shared:30.0.2 > com.android.tools.analytics-library:protos:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.analytics-library:tracker:30.0.2
Could not find com.google.protobuf:protobuf-java-util:3.10.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/protobuf/protobuf-java-util/3.10.0/protobuf-java-util-3.10.0.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:bundletool:1.6.0
Could not find com.google.code.gson:gson:2.8.6.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdklib:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.analytics-library:shared:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > androidx.databinding:databinding-compiler-common:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.build:manifest-merger:30.0.2
Could not find io.grpc:grpc-core:1.21.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/io/grpc/grpc-core/1.21.1/grpc-core-1.21.1.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.2
Could not find io.grpc:grpc-netty:1.21.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/io/grpc/grpc-netty/1.21.1/grpc-netty-1.21.1.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.2
Could not find io.grpc:grpc-protobuf:1.21.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/io/grpc/grpc-protobuf/1.21.1/grpc-protobuf-1.21.1.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.2
Could not find io.grpc:grpc-stub:1.21.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/io/grpc/grpc-stub/1.21.1/grpc-stub-1.21.1.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.2
Could not find com.google.crypto.tink:tink:1.3.0-rc2.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/crypto/tink/tink/1.3.0-rc2/tink-1.3.0-rc2.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
Could not find com.google.flatbuffers:flatbuffers-java:1.12.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/flatbuffers/flatbuffers-java/1.12.0/flatbuffers-java-1.12.0.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
Could not find org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/tensorflow/tensorflow-lite-metadata/0.1.0-rc2/tensorflow-lite-metadata-0.1.0-rc2.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2
Could not find org.bouncycastle:bcprov-jdk15on:1.56.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.build:apkzlib:7.0.2
Could not find com.google.guava:guava:30.1-jre.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/guava/guava/30.1-jre/guava-30.1-jre.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:aaptcompiler:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.analytics-library:crash:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.analytics-library:shared:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > androidx.databinding:databinding-compiler-common:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder-test-api:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:bundletool:1.6.0
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:gradle-api:7.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2 > com.android.tools:common:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.analytics-library:tracker:30.0.2
Could not find org.jetbrains.kotlin:kotlin-reflect:1.4.32.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-reflect/1.4.32/kotlin-reflect-1.4.32.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
Could not find javax.inject:javax.inject:1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/javax/inject/javax.inject/1/javax.inject-1.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:bundletool:1.6.0
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2
Could not find net.sf.kxml:kxml2:2.3.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.ddms:ddmlib:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.lint:lint-model:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.layoutlib:layoutlib-api:30.0.2
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools.build:builder:7.0.2 > com.android.tools.build:manifest-merger:30.0.2
Could not find org.jetbrains.intellij.deps:trove4j:1.0.20181211.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/intellij/deps/trove4j/1.0.20181211/trove4j-1.0.20181211.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
Could not find xerces:xercesImpl:2.12.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/xerces/xercesImpl/2.12.0/xercesImpl-2.12.0.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > com.android.tools.build:gradle:7.0.2 > com.android.tools:sdk-common:30.0.2
Could not find org.apache.commons:commons-compress:1.20.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/apache/commons/commons-compress/1.20/commons-compress-1.20.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
ANSWER
Answered 2021-Sep-17 at 11:03Add mavenCentral() in Build Script
repositories {
mavenCentral()
google()
}
QUESTION
Manifest merger failed : android:exported needs to be explicitly specified for <receiver>
Asked 2022-Feb-07 at 15:04Merging Errors: Error: android:exported needs to be explicitly specified for element <receiver#com.instacart.library.truetime.BootCompletedBroadcastReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for
android:exported
when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details. test.app main manifest (this file), line 19
I don't even know what to do. I struggled with this mistake for a whole week, but I couldn't.
Here is my sdk version
compileSdkVersion 32
defaultConfig {
multiDexEnabled true
applicationId "com.example.app"
minSdkVersion 21
targetSdkVersion 32
versionCode 53
versionName "2.0.4"
ndk.abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Wrote android:exported
on all intent-filter
, service
, and provider
. Ah, I don't have the receiver
mentioned in this error.
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation "com.android.billingclient:billing:4.0.0"
implementation "com.google.firebase:firebase-messaging:23.0.0"
implementation "com.google.firebase:firebase-crashlytics:18.2.7"
implementation "com.google.firebase:firebase-analytics:20.0.2"
implementation "com.google.firebase:firebase-perf:20.0.4"
implementation "com.google.firebase:firebase-dynamic-links:21.0.0"
implementation 'com.google.firebase:firebase-core:20.0.2'
implementation 'com.google.firebase:firebase-database:20.0.3'
implementation 'com.google.firebase:firebase-auth:21.0.1'
implementation 'com.google.firebase:firebase-config:21.0.1'
implementation "com.facebook.android:facebook-login:9.0.0"
implementation "com.facebook.android:facebook-share:[5,6)"
implementation "com.linecorp:linesdk:5.0.1"
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.6.10'
implementation "com.squareup.retrofit2:retrofit:2.8.1"
implementation "com.squareup.retrofit2:converter-gson:2.8.1"
implementation 'com.squareup.retrofit2:adapter-rxjava:2.3.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.2.1'
implementation 'io.reactivex:rxandroid:1.2.1'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.sun.easysnackbar:easysnackbar:1.0.1'
implementation 'com.romandanylyk:pageindicatorview:1.0.3@aar'
implementation 'com.google.android.exoplayer:exoplayer:2.16.1'
//MULTI DEX
implementation "androidx.multidex:multidex:2.0.1"
implementation 'com.google.android:flexbox:2.0.1'
implementation 'com.github.florent37:diagonallayout:1.0.9'
implementation('io.socket:socket.io-client:1.0.0') {
exclude group: 'org.json', module: 'json'
}
implementation 'com.github.instacart.truetime-android:library:3.4'
implementation 'com.github.instacart.truetime-android:library-extension-rx:3.4'
implementation "androidx.navigation:navigation-fragment-ktx:2.4.0"
implementation "androidx.navigation:navigation-ui-ktx:2.4.0"
implementation "com.github.bumptech.glide:glide:4.12.0"
annotationProcessor "com.github.bumptech.glide:compiler:4.12.0"
implementation "de.hdodenhof:circleimageview:3.1.0"
implementation "com.pixplicity.easyprefs:library:1.9.0"
implementation "com.jakewharton.timber:timber:4.7.1"
implementation "com.airbnb.android:lottie:3.4.0"
implementation 'com.github.jinatonic.confetti:confetti:1.1.2'
implementation "com.nabinbhandari.android:permissions:3.8"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation "com.github.YarikSOffice:lingver:1.2.1"
implementation 'com.github.mreram:showcaseview:1.2.0'
implementation 'com.github.shripal17:MaterialIntroView-v2:2.2.0'
implementation 'com.github.unsplash:unsplash-photopicker-android:1.0.0'
implementation 'com.giphy.sdk:ui:2.1.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'androidx.test:core:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation "androidx.test.ext:junit:1.1.3"
}
ANSWER
Answered 2022-Feb-07 at 14:59com.instacart.library.truetime.BootCompletedBroadcastReceiver
check this in manifest file....
check your lib you imported if they compatible with your android version
Rebuild your project.
share you manifest and
compileSdkVersion 32
defaultConfig {
multiDexEnabled true
applicationId "com.example.app" /// change your app Id not to use example... This will be rejected on play store
minSdkVersion 21
targetSdkVersion 32
versionCode 53
versionName "2.0.4"
//comment out this ndk.abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
QUESTION
Android API 31 FLAG_IMMUTABLE Error using Firebase Auth UI
Asked 2022-Jan-20 at 05:58I'm receving the below error in API 31 devices during Firebase Auth UI library(Only Phone number credential),
Fatal Exception: java.lang.IllegalArgumentException: com.sstech.racemanager: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:458)
at android.app.PendingIntent.getActivity(PendingIntent.java:444)
at android.app.PendingIntent.getActivity(PendingIntent.java:408)
at com.google.android.gms.internal.auth-api.zzr.zzc(zzr.java:19)
at com.google.android.gms.auth.api.credentials.CredentialsClient.getHintPickerIntent(CredentialsClient.java:10)
at com.firebase.ui.auth.ui.phone.CheckPhoneHandler.fetchCredential(CheckPhoneHandler.java:28)
at com.firebase.ui.auth.ui.phone.CheckPhoneNumberFragment.setDefaultCountryForSpinner(CheckPhoneNumberFragment.java:238)
at com.firebase.ui.auth.ui.phone.CheckPhoneNumberFragment.onActivityCreated(CheckPhoneNumberFragment.java:127)
at androidx.fragment.app.Fragment.performActivityCreated(Fragment.java:2996)
at androidx.fragment.app.FragmentStateManager.activityCreated(FragmentStateManager.java:580)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:285)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3138)
at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:3072)
at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:251)
at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:502)
at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:246)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1455)
at android.app.Activity.performStart(Activity.java:8339)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3925)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2407)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:233)
at android.os.Looper.loop(Looper.java:334)
at android.app.ActivityThread.main(ActivityThread.java:8278)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1065)
Below is my gradle files,
app Level:
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
}
apply plugin: 'kotlin-android-extensions'
apply plugin: "androidx.navigation.safeargs.kotlin"
apply plugin: 'com.google.firebase.firebase-perf'
def versionMajor = 2
def versionMinor = 0
def versionPatch = 10
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.aaa.xxxx"
minSdkVersion 21
targetSdkVersion 31
versionCode versionMajor * 10000 + versionMinor * 100 + versionPatch
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas".toString())
arg("room.incremental", "true")
arg("room.expandProjection", "true")
}
}
}
buildTypes {
debug {
minifyEnabled false
multiDexEnabled true
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
manifestPlaceholders = [enableCrashReporting: "false"]
}
}
// Enables data binding.
buildFeatures {
dataBinding = true
}
compileOptions {
sourceCompatibility = 1.7
}
// For Java issue
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.google.android.play:core-ktx:1.8.1'
implementation 'com.google.firebase:firebase-perf:20.0.4'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0'
implementation 'com.google.android.gms:play-services-maps:18.0.1'
implementation 'androidx.preference:preference:1.1.1'
implementation "androidx.coordinatorlayout:coordinatorlayout:1.1.0"
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'androidx.arch.core:core-runtime:2.1.0'
// Firebase
implementation platform('com.google.firebase:firebase-bom:29.0.3')
implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'com.google.firebase:firebase-storage-ktx'
implementation 'com.google.firebase:firebase-database-ktx'
implementation 'com.google.firebase:firebase-config-ktx'
implementation 'com.google.firebase:firebase-inappmessaging-display-ktx'
implementation 'com.google.firebase:firebase-messaging-ktx'
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-dynamic-links'
implementation 'com.google.firebase:firebase-functions'
implementation 'com.google.firebase:firebase-firestore-ktx'
implementation 'com.firebaseui:firebase-ui-auth:8.0.0'
// Fragment
implementation "androidx.navigation:navigation-fragment-ktx:2.3.5"
implementation "androidx.navigation:navigation-ui-ktx:2.3.5"
implementation "androidx.fragment:fragment-ktx:1.4.0"
// LifeCycle
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0"
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.lifecycle:lifecycle-common-java8:2.4.0"
// Circle Image View
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation "androidx.recyclerview:recyclerview:1.2.1"
// For control over item selection of both touch and mouse driven selection
// Image cache
implementation 'com.github.bumptech.glide:glide:4.12.0'
kapt 'com.github.bumptech.glide:compiler:4.12.0'
//gmap
implementation 'com.google.android.gms:play-services-location:19.0.0'
// compressor
implementation 'id.zelory:compressor:3.0.1'
implementation 'com.github.Shouheng88:compressor:1.5.0'
// kotlin general
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.31"
//Zoom
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
//Room
implementation "androidx.room:room-runtime:2.3.0"
kapt "androidx.room:room-compiler:2.3.0"
implementation "androidx.room:room-ktx:2.3.0"
// json
implementation 'com.google.code.gson:gson:2.8.9'
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.13.0"
// SDP
implementation 'com.intuit.sdp:sdp-android:1.0.6'
implementation 'com.intuit.ssp:ssp-android:1.0.6'
// Security
implementation "androidx.security:security-crypto:1.1.0-alpha03"
// Animation
implementation 'com.airbnb.android:lottie:4.2.2'
// Browser
implementation "androidx.browser:browser:1.4.0"
// Camera
def camerax_version = "1.0.2"
// CameraX core library using camera2 implementation
implementation "androidx.camera:camera-camera2:$camerax_version"
// CameraX Lifecycle Library
implementation "androidx.camera:camera-lifecycle:$camerax_version"
// CameraX View class
implementation "androidx.camera:camera-view:1.0.0-alpha31"
implementation "com.github.lisawray.groupie:groupie:2.9.0"
implementation 'com.github.dhaval2404:imagepicker:2.1'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
implementation 'androidx.work:work-runtime-ktx:2.7.1'
}
Project level,
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.google.firebase:perf-plugin:1.4.0'
def nav_version = "2.3.5"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I've searched online and for some the issue is resolved by adding androidx.work:work-runtime-ktx:2.7.1 pacakage, but in my case even this is not solving.
Can anyone help on this issue.
ANSWER
Answered 2022-Jan-20 at 05:58In my case, firebase UI (com.firebaseui:firebase-ui-auth:8.0.0) was using com.google.android.gms:play-services-auth:19.0.0 which I found with the command './gradlew -q app:dependencyInsight --dependency play-services-auth --configuration debugCompileClasspath'
This version of the play services auth was causing the issue for me.
I added a separate
implementation 'com.google.android.gms:play-services-auth:20.0.1'
to my gradle and this issue disappeared.
QUESTION
How to better position Next/Back button in shiny glide, in order to eliminate large white space?
Asked 2022-Jan-18 at 15:22The Shinyglide package is just what I need, using a carousel for grouped radio buttons giving the user many choices for data parsing.
However, the "Next" (and "Back") button occupies a large white space. I'd like to shift the button in line with the glide row (see image at bottom). Does anyone know how to do this? Is there a CSS trick? Reading through the Glide manual, the only choices are "top" and "bottom".
If moving the Next/Back button isn't possible, a secondary option is to insert (a somewhat superfluous) line of text but in line with the Next/Back buttons, to at least cover up the annoyingly large white space.
The actual panel this is for has much more information presented than in this example, so I'm trying to make the page as clean as possible.
Please see image at bottom that better explains what I'm trying to do.
Reproducible example:
library(dplyr)
library(DT)
library(shiny)
library(shinyglide)
ui <-
fluidPage(
fluidRow(div(style = "margin-top:15px"),
strong("Input choices shown in row below, click ´Next´ to see more choices:"),
column(12, glide(
height = "25",
controls_position = "top",
screen(
div(style = "margin-top:10px"),
wellPanel(
radioButtons(inputId = 'group1',
label = NULL,
choiceNames = c('By period','By MOA'),
choiceValues = c('Period','MOA'),
selected = 'Period',
inline = TRUE
),
style = "padding-top: 12px; padding-bottom: 0px;"
)
),
screen(
div(style = "margin-top:10px"),
wellPanel(
radioButtons(inputId = 'group2',
label = NULL,
choiceNames = c('Exclude CT','Include CT'),
choiceValues = c('Exclude','Include'),
selected = 'Exclude',
inline = TRUE
),
style = "padding-top: 12px; padding-bottom: 0px;"
)
)
)
)
),
DTOutput("plants")
)
server <- function(input, output, session) {
output$plants <- renderDT({iris %>% datatable(rownames = FALSE)})
}
shinyApp(ui, server)
ANSWER
Answered 2022-Jan-18 at 15:22You could use a custom control element with custom_controls
, and then have it hover over the displayed screen on the top right with a container set to absolute positioning. Setting a limited width for the container will ensure that the back button won't fly too far out.
Something along these lines:
glide(custom_controls = div(class = "glide-controls", glideControls()), ...)
# Somewhere in the UI
tags$style(
".glide-controls { position: absolute; top: 18px; right: 15px; width: 160px; }"
)
Just make sure to also set controls_position = "bottom"
so that the controls hover over the screen content, rather than under it.
A minimal example app:
library(shiny)
library(shinyglide)
ui <- fixedPage(
h3("Simple shinyglide app"),
tags$style(
".glide-controls { position: absolute; top: 18px; right: 15px; width: 160px; }"
),
glide(
custom_controls = div(class = "glide-controls", glideControls()),
screen(wellPanel(p("First screen."))),
screen(wellPanel(p("Second screen.")))
)
)
server <- function(input, output, session) {}
shinyApp(ui, server)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
No vulnerabilities reported
Save this library and start creating your kit
HTTPS
https://github.com/bumptech/glide.git
CLI
gh repo clone bumptech/glide
SSH
git@github.com:bumptech/glide.git
Share this Page
See all related Kits
by apple
by ionic-team
by vsouza
by fastlane
by bumptech
See all iOS Libraries
by bumptech C
by bumptech C
by bumptech Java
by bumptech C
by bumptech JavaScript
See all Libraries by this author
by apple
by bumptech
by ionic-team
by fastlane
by react-native-community
See all iOS Libraries
by alistairrutherford
by simon-heinen
by mattdesl
by appcelerator-modules
by 7heaven
See all iOS Libraries
by alistairrutherford
by simon-heinen
by StevenByle
by ManuelPeinado
by selendroid
See all iOS Libraries
by Scandit
by ikew0ng
by ni3po42
by BeyondAR
by pietrorampini
See all iOS Libraries
by LiveRamp
by halzhang
by hbmartin
by tasomaniac
by zhangjianli
See all iOS Libraries
Save this library and start creating your kit
Open Weaver – Develop Applications Faster with Open Source