Getting "Could not get unknown property 'com'..." after upgrading Gradle and Android Studio to the latest versions - android-gradle-plugin

So as described above, I get the following error:
Could not get unknown property 'com' for object of type com.android.build.gradle.AppExtension
The code that it has a problem with is the following bit.
project.tasks.withType(com.android.build.gradle.tasks.Dex) {
additionalParameters = ['--core-library']
}
Would appreciate any help as I am a bit lost with Gradle and what exactly to do here.

Related

Missing Template Arguments for pcl::gpu::EuclideanClusterExtraction in PCL-1.12

I am trying this example to use PCL with GPU and get the error
~/gpu-pcl/main.cpp:85: error: missing template arguments before ‘gec’
pcl::gpu::EuclideanClusterExtraction gec;
I have tried that example with pcl-1.11.1 and it worked well .But when updated to pcl-1.12.1, I get that error.
My work environment:
Ubuntu 18.04,
with Cmake version 3.20,
Is there anything that I have missed out??
In the documentation of pcl1.12:
template
class pcl::gpu::EuclideanClusterExtraction< PointT >
EuclideanClusterExtraction is a template class, thus the type of point of the point cloud is needed in the position of PointT, for example, PointXYZ.[https://pointclouds.org/documentation/classpcl_1_1gpu_1_1_euclidean_cluster_extraction.html#details]

Kotlin BuildType 'XYZ': id 'XYZ' is already used in BuildType(uuid='', id='XYZ', name='Deploy to envr') error

I was trying to refactor my Kotlin file that contains the configuration for a TeamCity pipeline. However, I keep getting the following error:
BuildType 'KotlinExperiments_DeployToEnvironment': id 'KotlinExperiments_DeployToEnvironment' is already used in BuildType(uuid='', id='KotlinExperiments_DeployToEnvironment', name='Deploy to test')
I tried to dynamically assign an ID, but that doesn't seem to work. Here are the links to the relevant files:
.teamcity/settings.kts
.teamcity/KotlinExperiments.kt
.teamcity/_buildTypes/DeployToEnvironment.kt
What am I missing?
It appears that there was an extra } in this line which is an invalid character for an ID. TeamCity didn't really provide an accurate error. After deleting the whole and recreating it again, TeamCity provided a much better error which led me to this finding.

Typo3 Extension: Injection of repository doesn't work anyway

I followed the official Guide from Typo3 for creating a new extension (https://docs.typo3.org/m/typo3/book-extbasefluid/9.5/en-us/4-FirstExtension/Index.html). But when I finished, the page with the plugin gives me only an ERROR 500. No Error-Log anyway.
When I enabled ErrorDisplay I found, that there was a problem with boolean values. So I deleted them and tried again. Again all I got was ERROR 500. ErrorDisplay said the constructor cannot have a return value - hu?? Found inline 7 - but the declaration is in line 22 -??
public function __construct(int $j = 0, int $n = 0, int $i = 0, int $p = 0, int $y = 0, int $a = 0): void {...}
So I tried to delete the return value. But then it told me, that the class couldn't be found. Next, I tried to find anything about that error but found even less than nothing.
I wasn't even able to find extensions that are implementing the way explained by the official guide. Is there anybody who can tell me, what is going wrong and where I can find a solution - I have no idea anymore.
After hours and hours trial and error I found the solution. The Problem is, that Typo3 doesn't give a proper error message due to failing with the exception handling. You have to enable normal PHP Errors to get a clue what is wrong. If there is any php error, Typo3 fails and gives an reflection error, because it thinks the class isn't available.
First Error was: following the official guide instructions for first extension. Compiler ist failing if you try to give the constructor a return value.
Second Error: Typo3 doesn't recognize if a parameter in constructor is missing. It tries to take the next parameter and fails by comparing the parameters type.
Third Error: If the class is missing the instructions for underlying symphony framework the reflection also fails with registering the class without giving any error message.
After I found and corrected all the errors, all worked fine.

"inferred type is FragmentManager? but FragmentManager was expected" error after moving to androidX

I just moved my project to androidX. I used android studio refactor->upgrade to androidX. TargetSDK was already 28 and was working fine. So was not expecting many errors. But I was wrong and getting many errors, most of them are about fragmentManager
inferred type is FragmentManager? but FragmentManager was expected
This is when I am calling show method of a custom bottomSheetDialogue in a fragment.
bottomDialog.newInstance(//options here
).show(fragmentManager, bottomDialog.TAG)
The method is annotated as Nullable. Change like this
fragmentManager?.let { manager ->
bottomDialog.newInstance(//options here
).show(manager, bottomDialog.TAG)
}
Make sure you import androidx.fragment.app.FragmentManager instead of a android.app.FragmentManager
I ended up using parentFrgamentManager and it solved the issue. I tried with supportFragmentManager but it wasn't recognised, so used parentFragmentManager. This is the code I used.
bottomDialog.newInstance(//options here
).show(parentFragmentManager, bottomDialog.TAG)

Alamofire 3.4.0 post call errors on iphone but builds without errors on emulator

The following code build on emulator without error but gives and error when building on iPhone. Xcode updated to the latest release 7.3, Alamofire 3.4.0
Alamofire.request(.POST, endPoint,parameters:tokenParams )
.responseJSON {(response ) in
guard let data = response.data else {
print("error calling getting data from response")
self.delegate?.handleReturnedData("Error! getting data on call to get token" )
return
}
the error I get on building target iPhone is:
Value of tuple type '(NSURLRequest?, NSHTTPURLResponse?, Result)' (aka '(Optional, Optional, Result)') has no member 'data'
Any idea of what is going on?
Problem solved deleting derived data for the project.
Xcode->Window->Projects->currentProject Derived Data Delete
I discovered this by trial and error or by luck