ricohapi / theta-client

A library to control RICOH THETA
MIT License
15 stars 11 forks source link

Unresolved references problem #16

Closed jsantamariag closed 1 year ago

jsantamariag commented 1 year ago

Hello! I'm having the same problem over and over again that makes me unable to use the package :(

I have tried both running the demo-flutter and creating a project to add the theta_client_flutter package to it and use it, but in both cases, once everything is set up, built without errors and I try to run, i get the same problems:

Launching lib\main.dart on Android SDK built for x86 in debug mode... Running Gradle task 'assembleDebug'... e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (11, 37): Unresolved reference: manufacturer e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (14, 39): Unresolved reference: wlanMacAddress e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (15, 44): Unresolved reference: bluetoothMacAddress e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (17, 35): Unresolved reference: supportUrl e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (21, 28): Unresolved reference: api e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (22, 24): Not enough information to infer type variable V e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (23, 37): Unresolved reference: endpoints e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (24, 44): Unresolved reference: endpoints e: C:\Users\Javier\StudioProjects\theta-client\demos\demo-flutter\your_app_name\packages\theta_client_flutter\android\src\main\kotlin\com\ricoh360\thetaclient\theta_client_flutter\ConvertUtil.kt: (26, 33): Unresolved reference: apiLevel

FAILURE: Build failed with an exception.

As you guys can see, some references are not being resolved. I've navigated through the project and noticed that "manufacturer" and rest of references are inside ThetaInfo class in theta_client_flutter.dart. Something is going wrong and I don't know what it is.

Hope someone can give any clue. Thanks!

codetricity commented 1 year ago

@jsantamariag I have the same problem as you if I use the main branch and do not know how to fix it on the main branch.

However,I have demo-flutter working with no problems with a Windows 11 build and v 1.0.0 release (not the main branch, which has stopped working for me)

https://youtu.be/dJV5s46xFA0

I also built a brand new Flutter app from scratch using the theta-client library (not based on the demo-flutter example) using `flutter create --platforms=android -a

https://youtu.be/EAwT2j0x5VU

I've documented the process of using release .1.0.0 library with a new project at the link below with the full code using Flutter 3.7.7 and dart 2.19.4:

https://github.com/codetricity/theta_client_minimal/blob/main/README.md

using March 12 commit

On my system, the problem was introduced on March 13 in this commit. https://github.com/ricohapi/theta-client/commit/796e31aff501d5d628041782a11509371f985095

If I use the last March 12 commit, the build works for me

5b55776

discussion of community contributed apps

Please register at the forum below and share what you are building.

https://community.theta360.guide/

There are several people using theta-client to build Flutter apps and we would like to share tips. Thank you.

simago commented 1 year ago

@jsantamariag @codetricity It seems that theta-client v1.0.0 on maven central is referenced. Would you try to add maven local to demo-flutter/android/build.gradle like this:

allprojects {
    repositories {
        mavenLocal()
        google()
        mavenCentral()
    }
}
codetricity commented 1 year ago

This worked for me building on Windows 11 and deploying to Pixel 2 physical device (Android 11). I'm using the latest commits as of ceb425fa5de7cffcfd4459fb77d1b0753b2b60b1 (April 2nd, 2023 version).