tensorflow: Android: Error:(68, 13) Failed to resolve: org.tensorflow:tensorflow-android:+

Error:(68, 13) Failed to resolve: org.tensorflow:tensorflow-android:+

Are there some problems with remote repository?

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0-beta7'
    }
}

allprojects {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com'
        }
        maven { url "https://jitpack.io" }
    }
}

https://bintray.com/google/tensorflow/tensorflow-android

screenshot_1

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 25 (9 by maintainers)

Most upvoted comments

My apologies folks - while re-organizing the bintray repository the tensorflow-android aar artifact was incorrectly disconnected from jcenter. We’re working to resolve it ASAP.

In the interim, please use the workaround in https://github.com/tensorflow/tensorflow/issues/13653#issuecomment-336038164 or you can temporarily add the tensorflow bintray maven repository in your build.gradle

...
repositories {
  jcenter()
  maven {
    url 'https://google.bintray.com/tensorflow'
  }
  ...

temporary quick solution (without building) to add tensorflow to our android projects

download jar file https://ci.tensorflow.org/view/Nightly/job/nightly-android/lastStableBuild/artifact/out/libandroid_tensorflow_inference_java.jar and put to project_name\app\libs folder

add compile files('libs/libandroid_tensorflow_inference_java.jar') to you app build.gradle file

or just compile fileTree(include: ['*.jar'], dir: 'libs'):

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    ...
}

download libtensorflow_inference.so for armeabi-v7a (or for other android device processor architecture) https://ci.tensorflow.org/view/Nightly/job/nightly-android/lastStableBuild/artifact/out/native/libtensorflow_inference.so/armeabi-v7a/libtensorflow_inference.so and put to project_name\app\src\main\jniLibs\armeabi-v7a folder (or you may need different path, read https://github.com/tensorflow/tensorflow/issues/13653#issuecomment-336516671)

tensorflow / tensorflow Code Issues 1,308 Pull requests 199 Projects 0 Pulse Jump to bottom Open [tensorflow] Android studio doesn’t fetch setUseNNAPI #17924 @dnpawate dnpawate opened this issue about 2 hours ago in build.gradle below dependency will not download latest file of ./tensorflow/contrib/lite/java/src/main/java/org/tensorflow/lite/Interpreter.java

dependencies { compile ‘org.tensorflow:tensorflow-lite:+’ }

Hence we are getting unresolved symbol for new API setUseNNAPI

as gradle unable to download new API as below

/** Turns on/off Android NNAPI for hardware acceleration when it is available. */ public void setUseNNAPI(boolean useNNAPI) { if (wrapper != null) { wrapper.setUseNNAPI(useNNAPI); } else { throw new IllegalStateException(“NativeInterpreterWrapper has already been closed.”); } }