tensorflow: Android Example Doesn't Build: Could not get unknown property 'assembleRelease'
What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?
http://stackoverflow.com/questions/39602587/could-not-get-unknown-property-assemblerelease-for-project/39720618 http://stackoverflow.com/questions/39590549/after-update-to-android-studio-2-2-gradle-plugin-2-2-0-could-not-get-unknown
Environment info
Operating System: Ubuntu 16.10 Installed version of CUDA and cuDNN: Toolkit 8.0.1 cuDNN 5.1
If installed from binary pip package, provide:
https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.1-cp36-cp36m-linux_x86_64.whl 1.0.1
If possible, provide a minimal reproducible example (We usually don’t have time to read hundreds of lines of your code)
The default android example code. Specifically build.gradle
When trying to run the code on an emulator, for example, there is a config error:
Could not get unknown property 'assembleRelease for root project 'android' of type org.gradle.api Project (Get this twice)
Links to:
afterEvaluate {
assembleDebug.dependsOn copyNativeLibs
assembleRelease.dependsOn copyNativeLibs
}
from build.gradle lines 143-146
What other attempted solutions have you tried?
It looks like this is a conflict with gradle of some sorts. My knowledge is minimal with gradle/adroid studio. Some online threads say it should be included in a task but when putting
task afterEvaluate{ ...} there is a similar error and this doesn’t work either.
This post from a googler implies that your code is written as it should be though. https://code.google.com/p/android/issues/detail?id=219732#32
At my wits end with this. For reference, I am able to build with bazel from the terminal. This seems to be a gradle/AS induced issue.
Logs or other output that would be helpful
Information:Gradle tasks [:assembleDebug]
Error:(145, 1) A problem occurred configuring root project 'android'.
> Failed to notify project evaluation listener.
> Could not get unknown property 'assembleRelease' for root project 'android' of type org.gradle.api.Project.
> Could not get unknown property 'assembleRelease' for root project 'android' of type org.gradle.api.Project.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 23 (16 by maintainers)
I have had the same issue and this seems to help fix it.