Skip to content

Android react-native 0.72.6 failed to build  #32

@alanwong0922

Description

@alanwong0922

Android react-native 0.72.6 failed to build

Project information

 "react": "18.2.0",
 "react-native": "0.72.6",
 "react-native-image-tools-wm": "^1.5.8",

android/app/build.gradle

...
dependencies {
...
    implementation project(':react-native-image-tools-wm')
...
}
...

android/setting.gradle

rootProject.name = 'XXXXXXXXX'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
includeBuild('../node_modules/@react-native/gradle-plugin')
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-image-tools-wm'
project(':react-native-image-tools-wm').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-image-tools-wm/android')

include ':app'

android/app/src/... /MainApplication.java

package com.XXXX; 
import android.app.Application;
import net.wowmaking.RNImageToolsPackage;
...
  private final ReactNativeHost mReactNativeHost =
      new DefaultReactNativeHost(this) {
        @Override
        public boolean getUseDeveloperSupport() {
          return BuildConfig.DEBUG;
        }

        @Override
        protected List<ReactPackage> getPackages() {
          @SuppressWarnings("UnnecessaryLocalVariable")
          List<ReactPackage> packages = new PackageList(this).getPackages();
          // Packages that cannot be autolinked yet can be added manually here, for example:
          // packages.add(new MyReactNativePackage());
          packages.add(new RNImageToolsPackage());
          return packages;
        }
...

When I build the project with the android device

Note: Recompile with -Xlint:unchecked for details.
Note: /[XXX]/node_modules/react-native-get-location/android/src/main/java/com/github/douglasjunior/reactNativeGetLocation/util/GetLocation.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java:9: error: package android.support.media does not exist
import android.support.media.ExifInterface;
                            ^
/[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java:217: error: cannot find symbol
                        ExifInterface.TAG_ORIENTATION,
                        ^
  symbol:   variable ExifInterface
  location: class Utility
/[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java:218: error: cannot find symbol
                        ExifInterface.ORIENTATION_UNDEFINED
                        ^
  symbol:   variable ExifInterface
  location: class Utility
/[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java:216: error: cannot find symbol
                return new ExifInterface(filename).getAttributeInt(
                           ^
  symbol:   class ExifInterface
  location: class Utility
/[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java:235: error: cannot find symbol
                        ExifInterface.TAG_ORIENTATION,
                        ^
  symbol:   variable ExifInterface
  location: class Utility
/[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java:236: error: cannot find symbol
                        ExifInterface.ORIENTATION_UNDEFINED
                        ^
  symbol:   variable ExifInterface
  location: class Utility
/[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java:234: error: cannot find symbol
                return new ExifInterface(stream).getAttributeInt(
                           ^
  symbol:   class ExifInterface
  location: class Utility
/[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java:250: error: package ExifInterface does not exist
            case ExifInterface.ORIENTATION_NORMAL:
                              ^
/[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java:252: error: package ExifInterface does not exist
            case ExifInterface.ORIENTATION_FLIP_HORIZONTAL:
                              ^
/[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java:255: error: package ExifInterface does not exist
            case ExifInterface.ORIENTATION_ROTATE_180:
                              ^
/[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java:258: error: package ExifInterface does not exist
            case ExifInterface.ORIENTATION_FLIP_VERTICAL:
                              ^
/[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java:262: error: package ExifInterface does not exist
            case ExifInterface.ORIENTATION_TRANSPOSE:
                              ^
/[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java:266: error: package ExifInterface does not exist
            case ExifInterface.ORIENTATION_ROTATE_90:
                              ^
/[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java:269: error: package ExifInterface does not exist
            case ExifInterface.ORIENTATION_TRANSVERSE:
                              ^
/[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java:273: error: package ExifInterface does not exist
            case ExifInterface.ORIENTATION_ROTATE_270:
                              ^
Note: /[XXX]/node_modules/react-native-image-tools-wm/android/src/main/java/net/wowmaking/Utility.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
15 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-image-tools-wm:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions