Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zedtux opened this issue Jul 2, 2018 · 7 comments

Comments

@zedtux
Copy link

zedtux commented Jul 2, 2018

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
Copy link
Owner

@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
Copy link

SwagatRanjit84 commented Feb 3, 2019

@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.

  • What went wrong:
    Execution failed for task ':react-native-android-scanner:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

Can you share your code?

@alexruskovski
Copy link

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
Copy link

zahidahmed024 commented May 7, 2019

it worked for me ...
stack

@SamiChab
Copy link

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

@ZoHayk
Copy link

ZoHayk commented Oct 8, 2019

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
Copy link

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

Thanks a lot. that works for me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants