android provider com.google.firebase.provider.FirebaseInitProvider cannot be retrieved

I am developing an app for Android and am already in the test phase. I tested the app with an emulator running API 29, even though the project is configured for minSdkVersion 23. However, the error with this title is displayed. Research on it and those who have it happen solve it by adding Multidex. However, you use minSdk version 20 or less, i.e. Multidex if required. As already mentioned, my project is minSdkVersion. According to the official Google Multidex documentation page, this is automatically activated if minSdk version is 21 or more. Because of this, I'm not sure what to do to make it work. The app runs perfectly in API 27 or higher, but from 26 it doesn't open on the devices I'm testing on.

This is the logcat message

2020-02-17 01:33:43.871 5975-5975/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.Interactive.textmefriends, PID: 5975
java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList((zip file "/data/app/com.Interactive.textmefriends-e44Txln6Z1Rx80v1hUODRQ==/base.apk"),nativeLibraryDirectories=(/data/app/com.Interactive.textmefriends-e44Txln6Z1Rx80v1hUODRQ==/lib/x86, /system/lib, /vendor/lib))
    at android.app.ActivityThread.installProvider(ActivityThread.java:6288)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:5851)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5772)
    at android.app.ActivityThread.-wrap1(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661)
    at android.os.Handler.dispatchMessage(Handler.java:105)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6541)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
 Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList((zip file "/data/app/com.Interactive.textmefriends-e44Txln6Z1Rx80v1hUODRQ==/base.apk"),nativeLibraryDirectories=(/data/app/com.Interactive.textmefriends-e44Txln6Z1Rx80v1hUODRQ==/lib/x86, /system/lib, /vendor/lib))
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    at android.app.ActivityThread.installProvider(ActivityThread.java:6273)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:5851) 
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5772) 
    at android.app.ActivityThread.-wrap1(Unknown Source:0) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661) 
    at android.os.Handler.dispatchMessage(Handler.java:105) 
    at android.os.Looper.loop(Looper.java:164) 
    at android.app.ActivityThread.main(ActivityThread.java:6541) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 

This is the build.gradle module app

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.Interactive.textmefriends"
        minSdkVersion 23
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ('*.jar'))
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'com.google.firebase:firebase-analytics:17.2.2'

    implementation 'com.google.firebase:firebase-auth:19.2.0'
    implementation 'com.google.firebase:firebase-database:19.2.1'
    //implementation 'com.google.firebase:firebase-core:17.2.2'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.rengwuxian.materialedittext:library:2.1.4'
    implementation 'de.hdodenhof:circleimageview:3.1.0'
    implementation 'com.github.bumptech.glide:glide:4.11.0'

    implementation 'com.squareup.retrofit2:retrofit:2.7.1'
    implementation 'com.squareup.retrofit2:converter-gson:2.7.1'
    implementation 'com.google.firebase:firebase-messaging:20.1.0'

    implementation 'com.google.firebase:firebase-storage:19.1.1'
    implementation "androidx.fragment:fragment:1.2.1"
    implementation 'com.google.firebase:firebase-ads:18.3.0'

    implementation 'androidx.multidex:multidex:2.0.1'

    implementation 'com.google.firebase:firebase-firestore:21.4.0'
    testImplementation 'junit:junit:4.13'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

Design Patterns – Should the Redux Store make sure that data is retrieved, updated and deleted from an API?

I'm not very familiar with Redux, but most resources on the subject recommend putting CRUD API calls over middlewares in Redux memory and using additional states, such as: FETCH_SUCCEEDED. FETCH_FAILEDetc. to save the result.

Is it really necessary?

Doesn't this violate the principle of sole responsibility?

What are the advantages of the boilerplate-ish approach above compared to simply calling your API client and then sending the result data to the store?

PHP – How do I implement a loop on retrieved data by grouping by clause in Laravel?

I am trying to implement a loop on fetch data, but there are errors that the property does not exist.

$SaleOrderProducts = SaleOrderProducts::where('sale_order_id', $id)->get()->groupBy('purchase_order_product.products.id');

I tried

foreach($SaleOrderProducts as $product)

{
  return $product->products->id;
}

If I just come back $products

foreach($SaleOrderProducts as $product)

{
  return $product;
}

Then data is returned in this format

({"id":6,"sale_order_id":2,"product_id":5,"purchase_order_product_id":5,"qty_taken":75,"created_at":"2020-01-31 19:04:05","updated_at":"2020-01-31 22:33:41","purchase_order_product":{"id":5,"purchase_order_id":1,"product_id":5,"measurement_unit":"Cartons","expiry_date":"2020-02-01","created_at":"2020-01-31 19:02:03","updated_at":"2020-01-31 22:33:41","status":1,"initial_qty":454,"on_hand_qty":454,"free_qty":389,"orignal_qty":454,"location":null,"products":{"id":5,"name":"Glass","customer_id":1,"product_type_id":1,"product_status_id":1,"code":"d23123","status":1,"description":"kkd","storage_charge_method":"Per Location","volume":4444554,"weight":545,"random_weight":"Yes","warning_threshold_duration":0,"expiry_threshold_duration":0,"low_stock_notification":"off","low_threshold_duration":null,"stock_selection_method":"Locaiton Efficiency Only","strict_stock_selection":"off","stock_sub_selection_method":"Minimise Storage"}}})

Azure ARM template – Can existing resource names be retrieved to be used as parameters or variables in the new ARM deployment?

My problem is related to Azure ARM

I want to populate the list of allowed parameters with values ​​from the current resource group.
To put it bluntly: I want to put a virtual machine on the subnet of the virtual network, but I don't want to enter the vNet name manually. I've already found a way to get the resource group ID, resource group name, and subscription ID, but apparently there's no way to get a list of objects here?

Javascript – "Expected expression, has & # 39; === & # 39;" while the contents of the file are being retrieved

I'm getting the contents of a text file on another server, but if the contents of the file are there, the file will run as Javascript and some errors will occur. I need to view the contents of the file instead of running the file.
This is the content of my text file:

======**(2020-01-27 14:14:05)**======
NOTICE: Server version has been read.
NOTICE: Local version has been read.
NOTICE: Local version:11,Server version:16.
NOTICE: New version has been found.
NOTICE: Downloading the zip file....
NOTICE: File name get successfully.
NOTICE: Zip archive instance generated.
NOTICE: Folders deleted.
NOTICE: Zip file extracted.
NOTICE: Index variables has been changes.
NOTICE: Everything done.

And this is my javascript code:

var settings = {
    'cache': false,
    'dataType': "jsonp",
    "async": true,
    "crossDomain": true,
    "url": "https://" + $(this).data("landing") + "/updater/err.log",
    "method": "GET",
    "headers": {
    "accept": "application/json",
    "Access-Control-Allow-Origin":"*"
    }
    }

    $.ajax(settings).done(function (response) {
    console.log(""+response+"");
    });

Sheet name is retrieved dynamically in Google Sheet

I have 2 google sheets called "Repository" and "Order". Repository files contain many sheets such as notes, books, stationery, etc. Each element has a unique code. I need to get the description and price of an item based on the code from "Repository" to "Order". I used vlookup and import range for this.

VLOOKUP (B2, IMPORTRANGE ("File URL", "Note! A2: D100"), 2, false)

VLOOKUP (B2, IMPORTRANGE ("File URL", "Books! A2: D100"), 2, false)

Is it possible to use a single formula for this by dynamically changing the sheet name so that the item is retrieved across all sheets in the "repository"?

I used named range with INDIRECT

VLOOKUP (B2, IMPORTRANGE ("File URL", "INDIRECT (" & # 39; "& SheetList &" & # 39 ;! "&" A2: D100 "), 2, false)

Sheetlist is a named area in & # 39; Repository & # 39; that would be Note, Book, etc.

I get #name?
Unknown area name & # 39; SheetList & # 39;

Am I doing it wrong? Is there a way to get sheet names dynamically?
Please help me get out of there. thank you in advance

Javascript – Should we check if the primary key exists when we render a collection that is retrieved from the database?

My argument is, frontend doesn't care which database backend uses.

Sorry, but that's actually an argument to the Check the existence of IDs. The database backend is an abstraction that is usually leaky. It doesn't matter how much effort you make to make your frontend database independent. There is always something that behaves differently when you change the backend (at least the performance).

If two different backends are possible in the described case and IDs are mandatory in one backend, while this is not the case in the other case, you must of course take measures in the front end to handle both cases. This does not mean that this has to be done in every place where the IDs are used. There could also be an intermediate layer that ensures that the records have an ID at the time of playback.

So that boils down to the question of how much database independence you really need. If you are certain that records come from a database that ensures the existence of the IDs, you can skip the checks. This is an absolutely valid approach – creating a front end with 100% database agnostics is often not economical. Make code anyway To a certain degree db agnostic is fine.

Windows Powershell – When retrieving folder names and saving them in the array, every letter is sometimes retrieved as an element

I am trying to compile a .ps1 file to scan existing films that are in my Plex memory and compare them to a drive that I use to record films. A series of films that I don't have (determined by the file name) and a series of films that I already have are then created. Before I go into more detail, I will explain in my Plex Media folders how my films are organized.

In the root directory of my folder the type of the saved medium is listed. For example:
Tower.pauk.us Movies, TV shows, Music, Photos, etc.

For this program I only concentrate on the Movies folder.

Within the Movies folder I have a folder for each letter of the alphabet as well as for numbers and symbols. # , A , B , … Z
Sometimes I have a folder in these folders for, for example, "Quentin Tarantino Collection". Even if the movies in this folder do not start with "Q", the collection starts with "Q" so that it is in the / Q / folder.

Okay, now it's over and I can try to explain what my existing code is doing. So here is my code:

$PlexMovieFolders = Get-ChildItem \Tower.pauk.usPlexMovies | Where-object {$_.PSIsContainer} | Foreach-Object {$_.Name}

$List1 = Get-ChildItem -Path F: -Name -File -Exclude *.srt,*.DS_Store,*.dat,*.jpg
$List2 = @()
$Match = @()
$No_Match = @()


for ($i1 = 0; $i1 -le ($PlexMovieFolders.length - 1); $i1 += 1){
    $SubFolders = @()
    $folder = $PlexMovieFolders($i1)
    $List2 += Get-ChildItem -path \Tower.pauk.usPlexMovies$folder -Name -File -Exclude *.srt,*.DS_Store,*.dat,*.jpg
    $SubFolders = Get-ChildItem \Tower.pauk.usPlexMovies$folder | Where-object {$_.PSIsContainer} | Foreach-Object {$_.Name}
    if ($SubFolders.Length -gt 0) {
            for($i2 = 0; $i2 -le ($SubFolders.Length - 1); $i2 += 1){
                $folder2 = $SubFolders($i2)
                $List2 += Get-ChildItem -Path \Tower.pauk.usPlexMovies$folder$folder2 -Name -File -Exclude *.srt,*.DS_Store,*.dat,*.jpg
    }
    }
}


for ($i2 = 0; $i2 -le ($List2.length - 1); $i2 += 1){
    Write-Host ($List2.length - $i2) "Items Left"
    for ($i1 = 0; $i1 -le ($List1.length - 1); $i1 += 1){
        if($List1($i1) -eq $List2($i2)){
            $Match += $List1($i1)
        }else{
            $No_Match += $List1($i1)
        }
    }
}

We will proceed line by line, obviously starting from the top.

$PlexMovieFolders = Get-ChildItem \Tower.pauk.usPlexMovies | Where-object {$_.PSIsContainer} | Foreach-Object {$_.Name}

Here the code navigates to my Plex movie folder and stores each folder name in an array with the name $PlexMovieFolders,

$List1 = Get-ChildItem -Path F: -Name -File -Exclude *.srt,*.DS_Store,*.dat,*.jpg

Since the drive on which I record movies only contains the files directly in the root directory, I only have to save each movie name in an array with the name $List1,

$List2 = @()
$Match = @()
$No_Match = @()

This section defines a number of other variables that will be used later in the script for arrays.

for ($i1 = 0; $i1 -le ($PlexMovieFolders.length - 1); $i1 += 1){
    $SubFolders = @()
    $folder = $PlexMovieFolders($i1)
    $List2 += Get-ChildItem -path \Tower.pauk.usPlexMovies$folder -Name -File -Exclude *.srt,*.DS_Store,*.dat,*.jpg
    $SubFolders = Get-ChildItem \Tower.pauk.usPlexMovies$folder | Where-object {$_.PSIsContainer} | Foreach-Object {$_.Name}
    if ($SubFolders.Length -gt 0) {
            for($i2 = 0; $i2 -le ($SubFolders.Length - 1); $i2 += 1){
                $folder2 = $SubFolders($i2)
                $List2 += Get-ChildItem -Path \Tower.pauk.usPlexMovies$folder$folder2 -Name -File -Exclude *.srt,*.DS_Store,*.dat,*.jpg
    }
    }
}

This is a for loop. A loop is performed once for each element in the array $PlexMovieFolders, There's a lot going on here, so I'll try to break it down a little …

$SubFolders = @()

Since I sometimes have subfolders in every letter, I have to have a variable that can have an array of every subfolder for every letter. I'm assuming that the top of the for loop clears the array every time the loop is executed.

$folder = $PlexMovieFolders($i1)

This sets a variable on the individual entry in the $PlexMovieFolders Array in which the loop is located. I did that because with $PlexMovieFolder($i1) gave me problems within the actual command.

$List2 += Get-ChildItem -path \Tower.pauk.usPlexMovies$folder -Name -File -Exclude *.srt,*.DS_Store,*.dat,*.jpg

This section will go through all of the letter folders in my Plex Movies folder. From there, every file name is stored in an array, with the exception of some unnecessary files.

$SubFolders = Get-ChildItem \Tower.pauk.usPlexMovies$folder | Where-object {$_.PSIsContainer} | Foreach-Object {$_.Name}

This will go to the letter folder and get all folder names and save them in an array called $SubFolders, This is deleted every time the loop is executed, since each letter folder has its own subfolders. This section is the problem section. For some reason, only apparently random, but always the same folders are retrieved when this script is run, and each individual letter of the folder name is saved as separate elements in the array.

For example:
It will save Rambo Movies just like the whole folder name.

However, if it tries to save the "Quentin Tarantino Collection" in the array, it is saved as follows:

Q
u
e
n
t
i
n

T
a
r
a
n
t
i
n
o

C
o
l
l
e
c
t
i
o
n

It's very frustrating because when I run: $SubFolders = Get-ChildItem \Tower.pauk.usPlexMovies@ | Where-object {$_.PSIsContainer} | Foreach-Object {$_.Name} It works fine in a Powershell terminal … I'm not sure what I'm doing wrong. and that's why I hope for feedback.

if ($SubFolders.Length -gt 0) {
            for($i2 = 0; $i2 -le ($SubFolders.Length - 1); $i2 += 1){
                $folder2 = $SubFolders($i2)
                $List2 += Get-ChildItem -Path \Tower.pauk.usPlexMovies$folder$folder2 -Name -File -Exclude *.srt,*.DS_Store,*.dat,*.jpg
    }
    }

In this section you can see if the length of the $SubFolders array is greater than 0 and if so it will be moved to this subfolder and each file name will be saved in an array with the name $List2 This array is not cleared every time the loop is executed, because in the end I need the full list of films.

for ($i2 = 0; $i2 -le ($List2.length - 1); $i2 += 1){
    for ($i1 = 0; $i1 -le ($List1.length - 1); $i1 += 1){
        if($List1($i1) -eq $List2($i2)){
            $Match += $List1($i1)
        }else{
            $No_Match += $List1($i1)
        }
    }
}

This is the last section … there is a bit going on. What we're looking at is a "comparator" $List2 and see if there is an element $List1 fits with that. If there is a match, save it in the $Match Check array for me later. and if there is no match, save it in the $No_Match, I'll use that later $No_Match Array to automatically copy these movies to the Plex Movie folder.

TLDR;
$SubFolders = Get-ChildItem \Tower.pauk.usPlexMovies$folder | Where-object {$_.PSIsContainer} | Foreach-Object {$_.Name}
Sometimes takes the folder name characters instead of the folder name.
For example:

Q
u
e
n
t
i
n

T
a
r
a
n
t
i
n
o

C
o
l
l
e
c
t
i
o
n

However, his command works fine when I enter the variables by hand.
For example:
$SubFolders = Get-ChildItem \Tower.pauk.usPlexMoviesQ | Where-object {$_.PSIsContainer} | Foreach-Object {$_.Name}
Save as Quentin Tarantino Collection

Development – The page layout for a PublishingWeb cannot be retrieved with CSOM. Error "The object is not assigned to an object identity"

I'm working on a console application that uses CSOM to integrate with SharePoint Online. and I want to create a publishing page, so I wrote this code to get the page layout and create a new publishing page based on another page's values:

File tempWikiPage = context.Site.RootWeb.GetFileByServerRelativeUrl(scurl4 + tempItemTitle + ".aspx");
context.Load(tempWikiPage,items => items.ListItemAllFields);
context.ExecuteQuery();
List publishingLayouts = context.Site.RootWeb.Lists.GetByTitle("Master Page Gallery");
CamlQuery camlQuery4 = new CamlQuery();
camlQuery4.ViewXml = "" +
"Basic Page1";

ListItemCollection allItems = publishingLayouts.GetItems(camlQuery4);
context.Load(allItems,
items => items.Include(
item => item("Title")
));

context.ExecuteQuery();
ListItem layout = allItems.FirstOrDefault();
PublishingPageInformation publishingPageInfo = new PublishingPageInformation();
publishingPageInfo.PageLayoutListItem = layout;
PublishingPage pPage = pWeb.AddPublishingPage(publishingPageInfo);
ListItem newpage = pPage.ListItem;
newpage("Title") = newPageName;
newpage("PublishingPageContent") = r;
newpage("Standard") = tempWikiPage.ListItemAllFields("Standard");

Now I face these 2 problems: –
1. the layout will be zero.
2. As soon as the code is reached newpage("Standard") = tempWikiPage.ListItemAllFields("Standard"); I have this exception: –

The object is not assigned to an object identity or the object identity is invalid.

Microsoft.SharePoint.Client.ClientRequestException was caught
HResult = -2146233088 Message = The object is not linked to one
Object identity or object identity is invalid.
Source = Microsoft.SharePoint.Client.Runtime StackTrace:
at Microsoft.SharePoint.Client.DataConvert.WriteValueToXmlElement (XmlWriter
Writer, Object objValue, SerializationContext (serializationContext)
at Microsoft.SharePoint.Client.ClientActionInvokeMethod.WriteToXmlPrivate (XmlWriter
Writer, SerializationContext serializationContext)
at Microsoft.SharePoint.Client.ClientActionInvokeMethod..ctor (ClientObject
obj, String methodName, Object () parameter)
at Microsoft.SharePoint.Client.ListItem.SetFieldValue (String fieldName, Object value)
at Microsoft.SharePoint.Client.ListItem.set_Item (String fieldName, Object value)