larpon / QtFirebaseExample

Example Qt app for the QtFirebase project
MIT License
39 stars 28 forks source link

Ambiguous method overloading for method java.io.File#<init>... #19

Closed GregoryError closed 5 years ago

GregoryError commented 5 years ago

arm64-v8; NDK 19c uild file 'D:\backup\build-QtFirebaseExample-Android_for_arm64_v8a_Clang_Qt_5_13_0_for_Android_ARM64_v8a_773bb8-Release\android-build\build.gradle' line: 147

larpon commented 5 years ago

What version of Java? (JDK)

GregoryError commented 5 years ago

What version of Java? (JDK)

javac 1.8.0_191

GregoryError commented 5 years ago

I don`t know what I did but now it is said: https://pastebin.com/embed_iframe/XdrC55j0

My Build Tools 29.0.1 I should think

larpon commented 5 years ago

Hmm.. Ok, seems good - what about your Firebase C++ SDK?

You could try to bump the Google Play Services version in the build.gradle file to the newest. arm64 support is quite new so there might be some inconsistencies here and there. Although the project builds fine on my test machines (including arm64).

You could also try disabling the Gradle build steps that gives the error completely (:transformDexArchiveWithExternalLibsDexMergerForDebug)

We've had errors with the dex steps before. Usually these kind of errors is some version mismatch somewhere in the colossal build chain.

GregoryError commented 5 years ago

Hmm.. Ok, seems good - what about your Firebase C++ SDK?

You could try to bump the Google Play Services version in the build.gradle file to the newest. arm64 support is quite new so there might be some inconsistencies here and there. Although the project builds fine on my test machines (including arm64).

You could also try disabling the Gradle build steps that gives the error completely (:transformDexArchiveWithExternalLibsDexMergerForDebug)

We've had errors with the dex steps before. Usually these kind of errors is some version mismatch somewhere in the colossal build chain.

yes, the :google-services: version was wrong in build.gradle/ Thanks but now it is said: FAILURE: Build failed with an exception.

OR * What went wrong: Could not determine the dependencies of task ':compileDebugJavaWithJavac'.

while Release building

larpon commented 5 years ago

That also sound like possible version mismatches try updating: classpath 'com.google.gms:google-services:x.x.x' to a newer version if you can and see where that takes you 😊

edit

Argh that's what you already did...

It looks like a typical version mismatch error...

GregoryError commented 5 years ago

That also sound like possible version mismatches try updating: classpath 'com.google.gms:google-services:x.x.x' to a newer version if you can and see where that takes you

mb it is build:gradle version mismatch? The android studio said the gradle version is :5.1.1 how to know it precise?

larpon commented 5 years ago

It could very well be - try upgrading the gradle wrapper. What version of the Firebase C++ SDK are you building against? (Should be in the README somewhere)

GregoryError commented 5 years ago

It could very well be - try upgrading the gradle wrapper. What version of the Firebase C++ SDK are you building against? (Should be in the README somewhere)

It could very well be - try upgrading the gradle wrapper. What version of the Firebase C++ SDK are you building against? (Should be in the README somewhere)

'com.google.gms:google-services:4.2.0' is it it? it was suggested by Firebase while configuring new project

larpon commented 5 years ago

I just straight up hate Gradle.

Sorry, I needed to get that out of the system 😂

larpon commented 5 years ago

I think it's very likely a Gradle thing now.

So I think the google-services version is correct because the build gets further

larpon commented 5 years ago

So try and upgrade gradle/gradle wrapper

GregoryError commented 5 years ago

So try and upgrade gradle/gradle wrapper

Yes, I `m going to consider it

now I`ve looked at my another android project build.gradle file, and there is classpath 'com.android.tools.build:gradle:2.2.3' so I put 2.2.3 as the gradle version and got these: Could not find method implementation() for arguments [directory 'libs'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

now Gradle is 5.1.1

GregoryError commented 5 years ago

... I just stuck in the dependencies hell

larpon commented 5 years ago

If I recall correctly you can set the gradle version in one of the .properties files.

Try a newer version in distributionUrl in this file

GregoryError commented 5 years ago

If I recall correctly you can set the gradle version in one of the .properties files.

Try a newer version in distributionUrl in this file

ok. It seems I`ve figured out with gradle version. But now I have this:

FAILURE: Build failed with an exception.

firebase_cpp_sdk - is new. I got it from firebase website.

As I see it example it shoul be Firebase C++ SDK 4.0.1 ?

GregoryError commented 5 years ago

Could you please describe all your versions with all your environment? which ndk/sdk/compiler/firebase cpp/gradle/jdk do you use? oh, It is really challenging case ever!

qdel commented 5 years ago

Hi,

I am really interested by this problematic, i try also to build the default app before integrating it with my own.

But i can't find a way to make it work and meet exact same errors as @GregoryError.

Also, it is mandatory to use properties files to specify the path of ndk / sdk? The build.gradle file hints the use of environment variable. Which i find easier to use (and can be modified easily without using sed :P ).

larpon commented 5 years ago

Could you please describe all your versions with all your environment? which ndk/sdk/compiler/firebase cpp/gradle/jdk do you use?

Of course!

oh, It is really challenging case ever!

You can do it!

Here's my setup which compiles (with one deprecation warning) from a Linux host: QtFirebaseExample 1.2.4 git 1.2.4/master QtFirebase 1.4.2 git 1.4.2.1.2442879/master (both on current master branch)

It builds on desktops, Android (armeabi-v7a, arm64-v8a), and iOS:

Qt 5.12.4
Qt Creator 4.9.2

Firebase C++ SDK 6.1.0 (firebase_cpp_sdk) 

openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~18.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)

Android SDK Platform-Tools 26 (26.0.0)
Android SDK Tools (26.0.2)
Android SDK Build-Tools (28.0.3)

androidBuildToolsVersion=28.0.3
androidCompileSdkVersion=26

Android NDK r19

The compiler used is the one auto-detected by Qt Creator image

Gradle specific files used in the build: build.gradle gradle-wrapper.properties

I can't get to the iOS setup ATM

Hope it helps

larpon commented 5 years ago

Hi,

Hi @qdel - welcome to the tribe!

I am really interested by this problematic, i try also to build the default app before integrating it with my own.

It's doable indeed - I'm not the only person having it up and running :smile: There's apps in the app store which have it running. So it's not impossible!

But i can't find a way to make it work and meet exact same errors as @GregoryError.

Well, stay tuned!

Also, it is mandatory to use properties files to specify the path of ndk / sdk?

I'm not sure how mandatory they are anymore. I know that Qt's android-build tool is using them to get paths from etc. I can see that gradle.properties

The build.gradle file hints the use of environment variable. Which i find easier to use (and can be modified easily without using sed :P ).

Yes - they've changed the way they detect the firebase_cpp_sdk path in gradle now - I haven't had time to investigate yet

qdel commented 5 years ago

@Larpon, it builds!

I am making different tries to be sure of what i say. But for the moment, i point to a glitch in firebase framework.

With all your versions but firebase 6.2.2 i met the errors of @GregoryError at build step transformDexArchiveWithExternalLibsDexMergerFor[Debug/Release]

With version 6.1.0 the app build. I am making a try with 6.2.0, to confirm.

larpon commented 5 years ago

@qdel thanks for reporting back! Good to see some progress

GregoryError commented 5 years ago

With version 6.1.0 the app build. I am making a try with 6.2.0, to confirm.

where can I take a different versions of firebase_sdk`s ? for example version 6.1.0 ? I was trying to find it but as I understood I only can get very new one from official web.

qdel commented 5 years ago

Yes, i can confirm 6.2.0 bring a breaking change which make the transformDexArchiveWithExternalLibsDexMergerFor[Debug/Release] fail.

qdel commented 5 years ago

When you wget https://firebase.google.com/download/cpp, you can see the redirect to: https://dl.google.com/firebase/sdk/cpp/firebase_cpp_sdk_6.2.2.zip.

To get another version, just replace the version number, so: https://dl.google.com/firebase/sdk/cpp/firebase_cpp_sdk_6.1.0.zip

GregoryError commented 5 years ago

When you wget https://firebase.google.com/download/cpp, you can see the redirect to: https://dl.google.com/firebase/sdk/cpp/firebase_cpp_sdk_6.2.2.zip.

To get another version, just replace the version number, so: https://dl.google.com/firebase/sdk/cpp/firebase_cpp_sdk_6.1.0.zip

thx!

GregoryError commented 5 years ago

Today, despite of lots of segfaults and bugs I've finally send and receive my first cloud message! Yeah! I'm about to figure out further!

qdel commented 5 years ago

Same!

But only from qml and not from c++.

Also i am checking the "why" icon is not correctly displayed in the notification. (strange story with android "notification icon should be all white on transparent background" stuff)

It could be nice to incorporate c++ variant and this glitch on example. If i am motivated i will try a PR.

larpon commented 5 years ago

Haha congratulations both of you! Good job!

GregoryError commented 5 years ago

But if I try to send msg while the App is running I get this: log

I think I just have to write this java-method

larpon commented 5 years ago

You're supposed to implement your own behaviour when the app is open. Not everyone wants to show notifications when the app is already running. So that's expected- you should still get the message

GregoryError commented 5 years ago

You're supposed to implement your own behaviour when the app is open. Not everyone wants to show notifications when the app is already running. So that's expected- you should still get the message

yes, it seems I`ve read about it I should think.

GregoryError commented 5 years ago

Also i am checking the "why" icon is not correctly displayed in the notification. (strange story with android "notification icon should be all white on transparent background" stuff)

I think I know what you mean. The icon in the bar is grey-colored. I`ve seen it even when I just make Notifer without firebase. (from Qt examples)

GregoryError commented 5 years ago

I also interested in way I can send different messages depending on certain user. So I have to use unique users keys or smth?