ekke/ekkesSHAREexample

Probelms with Qt5.14.2 on windows

koahnig opened this issue · 4 comments

The example works fine on Windows 10 64 bit with Qt5.12.7

With Qt5.14.2 I changed to appopriate tool chain (SDK and NDK) and I created a new manifest through template button, but there are now some compilation errors in the java files (see output below)

Configure project :
WARNING: The option setting 'android.bundle.enableUncompressedNativeLibs=false' is experimental and unsupported.
The current default is 'true'.

Task :preBuild UP-TO-DATE
Task :preDebugBuild UP-TO-DATE
Task :compileDebugAidl UP-TO-DATE
Task :compileDebugRenderscript UP-TO-DATE
Task :checkDebugManifest UP-TO-DATE
Task :generateDebugBuildConfig
Task :javaPreCompileDebug UP-TO-DATE
Task :mainApkListPersistenceDebug UP-TO-DATE
Task :generateDebugResValues UP-TO-DATE
Task :generateDebugResources UP-TO-DATE
Task :mergeDebugResources UP-TO-DATE
Task :createDebugCompatibleScreenManifests UP-TO-DATE
Task :processDebugManifest
Task :processDebugResources

Task :compileDebugJavaWithJavac FAILED
R:\build-share_example_x-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_2_for_Android-Debug\android-build\src\org\ekkescorner\utils\QShareUtils.java:42: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;
^
R:\build-share_example_x-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_2_for_Android-Debug\android-build\src\org\ekkescorner\utils\QShareUtils.java:43: error: package android.support.v4.app does not exist
import android.support.v4.app.ShareCompat;
^
R:\build-share_example_x-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_2_for_Android-Debug\android-build\src\org\ekkescorner\utils\QShareUtils.java:223: error: cannot find symbol
Uri uri = FileProvider.getUriForFile(context, AUTHORITY, file);
^
symbol: variable FileProvider
location: class QShareUtils
R:\build-share_example_x-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_2_for_Android-Debug\android-build\src\org\ekkescorner\utils\QShareUtils.java:234: error: package ShareCompat does not exist
Intent sendIntent = ShareCompat.IntentBuilder.from(QtNative.activity()).getIntent();
^
R:\build-share_example_x-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_2_for_Android-Debug\android-build\src\org\ekkescorner\utils\QShareUtils.java:243: error: cannot find symbol
uri = FileProvider.getUriForFile(QtNative.activity(), AUTHORITY, imageFileToShare);
^
symbol: variable FileProvider
location: class QShareUtils
R:\build-share_example_x-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_2_for_Android-Debug\android-build\src\org\ekkescorner\utils\QShareUtils.java:274: error: package ShareCompat does not exist
Intent viewIntent = ShareCompat.IntentBuilder.from(QtNative.activity()).getIntent();
^
R:\build-share_example_x-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_2_for_Android-Debug\android-build\src\org\ekkescorner\utils\QShareUtils.java:283: error: cannot find symbol
uri = FileProvider.getUriForFile(QtNative.activity(), AUTHORITY, imageFileToShare);
^
symbol: variable FileProvider
location: class QShareUtils
R:\build-share_example_x-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_2_for_Android-Debug\android-build\src\org\ekkescorner\utils\QShareUtils.java:317: error: package ShareCompat does not exist
Intent editIntent = ShareCompat.IntentBuilder.from(QtNative.activity()).getIntent();
^
R:\build-share_example_x-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_2_for_Android-Debug\android-build\src\org\ekkescorner\utils\QShareUtils.java:326: error: cannot find symbol
uri = FileProvider.getUriForFile(QtNative.activity(), AUTHORITY, imageFileToShare);
^
symbol: variable FileProvider
location: class QShareUtils
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
9 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 6s
12 actionable tasks: 4 executed, 8 up-to-date
Building the android package failed!
-- For more information, run this command with --verbose.
16:00:54: The process "C:\Qt\5.14.2\android\bin\androiddeployqt.exe" exited with code 14.
Error while building/deploying project share_example_x (kit: Android for armeabi-v7a,arm64-v8a,x86,x86_64 (Clang Qt 5.14.2 for Android))
When executing step "Build Android APK"
16:00:54: Elapsed time: 00:21.

ekke commented

thx letting me know about. will test when I'll switch from 5.13.x to 5.15.x

homdx commented

@homdx

@koahnig May be my Pull request can be help you?
https://github.com/ekke/ekkesSHAREexample/pull/7/files

A year later I have downloaded your version and tried with Qt5.15.2 and it does work indead.
Thanks for your hint

ekke commented

in the meantime finally updated project to Qt 5.15.5