Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 28463

Can not build the example app of tflite-react-native

$
0
0

I tried to build the example app of tflite-react-native (v0.0.5) for my Android device (Android version 8.0.0), but it failed.

I cloned tflite-react-native, and build the example app without any changes to the code. The build failed with the following output. Is there any solution?

$ git clone https://github.com/shaqian/tflite-react-native.git
$ cd tflite-react-native/example
$ yarn
$ react-native run-android --deviceId XXXXXXXXXXXXX
Starting JS server...
Building the app...

> Configure project :app
WARNING: The specified Android SDK Build Tools version (28.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Configure project :react-native-image-picker
WARNING: The specified Android SDK Build Tools version (28.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Configure project :tflite-react-native
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Task :tflite-react-native:compileDebugJavaWithJavac
Note: /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/src/main/java/com/reactlibrary/TfliteReactNativeModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
Loading dependency graph, done.
bundle: Writing bundle output to: /Users/john/development/tflite-react-native/example/android/app/build/generated/assets/react/release/index.android.bundle
bundle: Done writing bundle output

> Task :tflite-react-native:compileReleaseJavaWithJavac
Note: /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/src/main/java/com/reactlibrary/TfliteReactNativeModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :tflite-react-native:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':tflite-react-native:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  Output:  error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
  error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
  /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:7: error: resource android:attr/colorError not found.
  /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:11: error: resource android:attr/colorError not found.
  /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
  /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
  /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
  /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/build/intermediates/res/merged/release/values/values.xml:954: error: resource android:attr/fontStyle not found.
  /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/build/intermediates/res/merged/release/values/values.xml:955: error: resource android:attr/font not found.
  /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/build/intermediates/res/merged/release/values/values.xml:956: error: resource android:attr/fontWeight not found.
  /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/build/intermediates/res/merged/release/values/values.xml:957: error: resource android:attr/fontVariationSettings not found.
  /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/build/intermediates/res/merged/release/values/values.xml:958: error: resource android:attr/ttcIndex not found.
  /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/build/intermediates/res/merged/release/values/values.xml:1039: error: resource android:attr/startX not found.
  /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/build/intermediates/res/merged/release/values/values.xml:1042: error: resource android:attr/startY not found.
  /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/build/intermediates/res/merged/release/values/values.xml:1045: error: resource android:attr/endX not found.
  /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/build/intermediates/res/merged/release/values/values.xml:1048: error: resource android:attr/endY not found.
  /Users/john/development/tflite-react-native/example/node_modules/tflite-react-native/android/build/intermediates/res/merged/release/values/values.xml:1056: error: resource android:attr/offset not found.
  error: failed linking references.

...


Viewing all articles
Browse latest Browse all 28463

Trending Articles