Start a new topic

Flutter 2.0.3 Wikitude 9.6

Wikitude supports flutter2 ???


I tried to install the plugin from the github examples and it gave me error (library "libflutter.so" not found) still including

         ndk {

             abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'arm64-v8a'

         }


I also tried adding it to a project from scratch but in this case the error is:


Execution failed for task ': augmented_reality_plugin_wikitude: bundleDebugAar'.

> Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken because the classes and Android resources from any local .aar file dependencies would not be packaged in the resulting AAR. Previous versions of the Android Gradle Plugin produces broken AARs in this case too (despite not throwing this error). The following direct local .aar file dependencies of the: augmented_reality_plugin_wikitude project caused this error: .... / plugin / augmented_reality_plugin_wikitude / android / wikitudesdk / wikitudesdk.aar


-----


flutter doctor:

[✓] Flutter (Channel stable, 2.0.3, on Linux, locale es_ES.UTF-8)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)

[✓] Chrome - develop for the web

[✓] Android Studio

[✓] VS Code (version 1.54.3)

[✓] Connected device (2 available)


• No issues found!



4 people have this problem

Hi Cristobal,


Unfortunately no, we still don't support Flutter 2, but we plan to do it soon (not sure in which version yet).


Regards,


Aitor.

Hello,


I updated my Flutter app from the 9.8 package to the 9.9 version. However, I am now getting the error mentioned above about local .aar dependencies. I did get this error before on 9.8 and I fixed that by updating my settings.gradle file. But now the error has returned and I haven't changed anything except updating the SDK and changing the minSdkVersion in my build.gradle file to 23.

I would expect this issue to happen as the emulator runs on a x86 architecture but our SDK is build for ARMv7 and ARMv8 architectures.

Hi,


As I can't reproduce you issue, I'll ask some questions in order to gather the info: How are you importing the wikitude plugin? Which architectures are you pointing in your gradle file? Which flutter version are you using? Did you try with our sample app in case you can reproduce the same issue -> https://github.com/Wikitude/wikitude-flutter-plugin-examples?


Regards,


Aitor.

Hello Aitor,


I tried building the examples and it worked, but when I updated the Gradle to 4.2.0 like I have in my project, I got the same error. I am using Appcenter to build and sign my app and I need the Gradle to be 4.2.0 because of a signing bug in Appcenter. Is there a way to work around this to have Wikitude work with Gradle 4.2.0?

Unfortunately there's no workaround for this. Our sdk is being generated with the Gradle version pointing to 3.6.0, which seems to be the root cause of the issue. I will create an internal ticket to update our internal gradle version, but until then, you will have to lower your version.

Is this update published???

Unfortunately no. The good news are that we are currently working on supporting the latest flutter version (2.0.6), so you can expect an upgrade soon.

Hello,


I have updated to v9.10 with flutter 2.2 and dart 2.13, but now I am also getting the error:

"Execution failed for task ':augmented_reality_plugin_wikitude:bundleDebugAar'.

> Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken because the classes and Android resources from any local .aar file dependencies would not be packaged in the resulting AAR. Previous versions of the Android Gradle Plugin produce broken AARs in this case too (despite not throwing this error). The following direct local .aar file dependencies of the :augmented_reality_plugin_wikitude project caused this error: C:\Users\User\Documents\devs\AndroidStudio\my_ar_project\plugin\android\wikitudesdk\wikitudesdk.aar"

How this can be corrected because I cannot use my app!


Hello I would like to have a reply on the issue I have raised yesterday because I cannot compile our app.

Hi,


As a workaround until the next version comes to live I would suggest you to apply the next changes into our plugin's folder:

  • Go to android/build.gradle.
  • Modify the rootProject.allprojects with:
rootProject.allprojects {
    repositories {
        google()
        jcenter()
        flatDir {
            dirs project(':augmented_reality_plugin_wikitude').file('wikitudesdk')
        }
    }
}
  • Modify implementation files('wikitudesdk/wikitude.aar') with implementation(name:'wikitudesdk', ext:'aar')


This issue has been fixed for 9.12, but unfortunately we don't have an estimation date when it will be released. Let me know if you still have the issue after applying the mentioned changes.


Regards,

Aitor.

Dear Aitor,


I have added the code and the project can be build, but I have noticed an issue when I enable the plugin path on pubspec.

On the project I load and save some data on local txt files (like the poi and language preference).

So once the plugin on pubspec is activated I get the following error when I try to load and save the data to the txt file.


The error that I get is the following:


[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: MissingPluginException(No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider)

E/flutter (21946): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:7)

E/flutter (21946): <asynchronous suspension>

E/flutter (21946): #1 getApplicationDocumentsDirectory (package:path_provider/path_provider.dart:138:24)

E/flutter (21946): <asynchronous suspension>

Hi,


Could you check if you are still implementing the next piece of code in the build.gradle of your application?

ndk {
    abiFilters 'armeabi-v7a'
}

If so, please remove it. This was introduced the first time we created the plugin because of a bug within flutter where the libflutter.so was only built for one architecture.


Regards,

Aitor.

Hi Aitor,


this is not implemented and still have the same issue with getApplicationDocumentsDirectory() every time I try to save something on the local files using path_provider.

Login or Signup to post a comment