aseemnishad / react-native-android-scanner

React native implementation of AndroidScannerDemo https://github.com/jhansireddy/AndroidScannerDemo
MIT License
12 stars 9 forks source link

error: cannot find symbol import android.support.v7.app.ActionBarActivity; #2

Open zedtux opened 6 years ago

zedtux commented 6 years ago

After having removed the android:allowBackup="false" line from my AndroidManifest.xml file, which prevented me to compile this project, I'm now facing the following compilation issue :

> Task :react-native-android-scanner:compileDebugJavaWithJavac FAILED
/Users/zedtux/Developments/companion/node_modules/react-native-android-scanner/android/src/main/java/com/reactlibrary/RNReactNativeAndroidScannerModule.java:11: error: cannot find symbol
import android.support.v7.app.ActionBarActivity;
                             ^
  symbol:   class ActionBarActivity
  location: package android.support.v7.app
1 error
aseemnishad commented 6 years ago

@zedtux please have look https://stackoverflow.com/questions/30803405/cannot-resolve-symbol-appcompatactivity-support-v7-libraries-arent-recognizeded. If didn't work, can you share the code? Let me try!

SwagatRanjit84 commented 5 years ago

@aseemnishad Didn;t work for me either. Task :react-native-android-scanner:compileDebugJavaWithJavac FAILED /home/swagat/reactnativeapp/androidscannerlatest/node_modules/react-native-android-scanner/android/src/main/java/com/reactlibrary/RNReactNativeAndroidScannerModule.java:11: error: cannot find symbol import android.support.v7.app.ActionBarActivity; ^ symbol: class ActionBarActivity location: package android.support.v7.app 1 error

FAILURE: Build failed with an exception.

Can you share your code?

alexruskovski commented 5 years ago

Usually, I am getting Execution failed for task ':react-native-android-scanner:compileDebugJavaWithJavac when there is not enough free RAM memory. Try rebuilding with closing most of your browser's tabs or even the browser.

zahidahmed024 commented 5 years ago

it worked for me ... stack

SamiChab commented 5 years ago

Switching to AndroidX helped me: import androidx.appcompat.app.AppCompatActivity;

ZoHayk commented 4 years ago

SamiChab Switching to AndroidX helped me: import androidx.appcompat.app.AppCompatActivity;

Thank you very much SamiChab . I searched for an answer to this error for 3 hours. Your option helped me

hamed8434 commented 4 years ago

Switching to AndroidX helped me: import androidx.appcompat.app.AppCompatActivity;

Thanks a lot. that works for me too.