Closed kalkun closed 3 years ago
For anyone else running into this problem, then I could solve it by downloading the *aar files instead.
What worked for me was to follow the solution here:
*.aar
files into app/aars/
app/build.gradle
:
api fileTree(include: ['*.aar'], dir: 'aars')
if (gradle.ext.has('BUILD_CORE_FROM_SOURCE') && gradle.ext.BUILD_CORE_FROM_SOURCE.toBoolean()) {
api project(path: ':mapbox-android-vision')
api project(path: ':mapbox-android-vision-ar')
api project(path: ':mapbox-android-vision-safety')
} else {
api "com.mapbox.vision:mapbox-android-vision:$vision"
api "com.mapbox.vision:mapbox-android-vision-ar:$vision"
api "com.mapbox.vision:mapbox-android-vision-safety:$vision"
}
Hi @kalkun, good to hear that workaround with direct aar
download works for you, though seems maven is still broken. Reopen to investigate.
We've indeed discovered that our custom maven repo has the issue an is not working at the moment. Working on the fix.
@yunikkk On a perhaps related note: it seems that when I add Vision SDK through aar
files, then I dont get a Mapbox Telemetry dependency. Which seems to be needed in order to call VisionMangager.init()
. I assume I would have had this if installed through the Maven repository, is this a correct assumption?
For reference I see a message like this:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/mapbox/android/telemetry/AttachmentListener;
at com.mapbox.vision.VisionManager.init(Unknown Source:0)
@yunikkk On a perhaps related note: it seems that when I add Vision SDK through
aar
files, then I dont get a Mapbox Telemetry dependency. Which seems to be needed in order to callVisionMangager.init()
. I assume I would have had this if installed through the Maven repository, is this a correct assumption?For reference I see a message like this:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/mapbox/android/telemetry/AttachmentListener; at com.mapbox.vision.VisionManager.init(Unknown Source:0)
Right, if you add dependencies via gradle/maven - vision dependencies are automatically added to the project, while aar
s does not allow to add transitive dependencies. You'll need to them manually as stated at https://vision.mapbox.com/install/,
dependencies {
implementation("com.mapbox.mapboxsdk:mapbox-android-accounts:0.3.0")
implementation("com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.3")
}
@kalkun we've rolled out the fix, https://github.com/mapbox/mapbox-vision-android-teaser/pull/227. This will require a new token though, so if you still need the fix please generate the new one.
The docs have been updated, new installation section is at https://docs.mapbox.com/android/vision/guides/
Getting 401 response error when trying to build app:
I have tried on the
dev
and onmaster
branch - with no changes of mine.I have also tried both with a token with scope
vision:download
and one with all scopes - both approaches received the same message.E.g., listing tokens through api call shows both:
In the
build.gradle
file I have tried throwing an exception that showsmapboxMavenUser=mapbox
andmapboxMavenToken=<my key>
: