shimohq / react-native-prompt-android

A polyfill library for Alert.prompt on Android platform, working both on Android and iOS platform.
MIT License
129 stars 74 forks source link

Won't build #36

Open jesobreira opened 6 years ago

jesobreira commented 6 years ago

My project worked fine on Expo. But after detaching, this is what I get when I try to build to Android:

react-native run-android --variant=debug
Scanning folders for symlinks in /path/to/app/node_modules (24ms)
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':react-native-prompt-android'.
      > Failed to notify project evaluation listener.
         > com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html

Not sure if it's also related but when I built the apk with exp build, it also did not work and showed: "TypeError: undefined is not an object (evaluating 'n.promptWithArgs')"

rozPierog commented 6 years ago

Hey @jesobreira, check if File → Settings → Build, Execution, Deployment → Instant Run and uncheck Enable Instant Run. helps you if you still have that problem.