alexkendall / react-native-bluetooth-cross-platform

Cross-Platform Bluetooth & WiFi React Native Module. Powered by underdark http://underdark.io/.
179 stars 35 forks source link

run-android fails after install #10

Open ourapolloproject opened 7 years ago

ourapolloproject commented 7 years ago

Hi Alex! Thanks so much for creating this library and underdark. Looks perfect for my application. I'm having some trouble getting it installed. Followed the instructions in readme but getting this error targeting Android 5.1

WifiTest me$ react-native -v react-native-cli: 2.0.1 react-native: 0.42.0

:app:compileDebugJavaWithJavac :app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). /Users/me/dev/WifiTest/android/app/src/main/java/com/wifitest/MainApplication.java:5: error: cannot find symbol import com.facebook.react.ReactApplication; ^ symbol: class ReactApplication location: package com.facebook.react /Users/me/dev/WifiTest/android/app/src/main/java/com/wifitest/MainApplication.java:7: error: cannot find symbol import com.facebook.react.ReactNativeHost; ^ symbol: class ReactNativeHost location: package com.facebook.react /Users/me/dev/WifiTest/android/app/src/main/java/com/wifitest/MainApplication.java:17: error: cannot find symbol public class MainApplication extends Application implements ReactApplication { ^ symbol: class ReactApplication /Users/me/dev/WifiTest/android/app/src/main/java/com/wifitest/MainApplication.java:19: error: cannot find symbol private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { ^ symbol: class ReactNativeHost location: class MainApplication /Users/me/dev/WifiTest/android/app/src/main/java/com/wifitest/MainApplication.java:36: error: cannot find symbol public ReactNativeHost getReactNativeHost() { ^ symbol: class ReactNativeHost location: class MainApplication /Users/me/dev/WifiTest/android/app/src/main/java/com/wifitest/MainActivity.java:5: error: MainActivity is not abstract and does not override abstract method getPackages() in ReactActivity public class MainActivity extends ReactActivity { ^ /Users/me/dev/WifiTest/android/app/src/main/java/com/wifitest/MainApplication.java:19: error: cannot find symbol private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { ^ symbol: class ReactNativeHost location: class MainApplication /Users/me/dev/WifiTest/android/app/src/main/java/com/wifitest/MainApplication.java:35: error: method does not override or implement a method from a supertype @Override ^ 8 errors :app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

alexkendall commented 7 years ago

@ourapolloproject I'll take a look sometime today and see if I can resolve this issue.

ourapolloproject commented 7 years ago

Thanks @alexkendall

baiej214 commented 7 years ago

@alexkendall Has the problem been solved?

priyankark commented 7 years ago

@alexkendall I am facing the same problem. I am a beginner. What's the solution, if any? Thank you.

Emilios1995 commented 7 years ago

This is happening to me as well. Pinging @virl, do you have any idea why this is happening?

virl commented 7 years ago

@Emilios1995 Hi. No, I'm currently completely unfamiliar with React build mechanics.

CaptAhak commented 7 years ago

Been having the same problem. In the android installation guide it states:

Under your project level build.gradle under repositories add the underdark dependency

repositories {
    ...
    maven {
        url 'https://dl.bintray.com/underdark/android/'
    }
}

so what I did at first was:

repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
            url 'https://dl.bintray.com/underdark/android/'
        }
    }

but when you change it to:

repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        maven {
            url 'https://dl.bintray.com/underdark/android/'
        }
    }

run-android works! I am currently at react native version 0.45.

Emilios1995 commented 7 years ago

I can confirm it works now with @CaptAhak's solution.

Awnage commented 3 years ago

Could not HEAD 'https://dl.bintray.com/underdark/android/io/underdark/underdark/maven-metadata.xml'. Received status code 403 from server: Forbidden

The server that underdark relies on (jFrog bintray) is being shut off. Expect builds to fail once your network cache clears.

savitaraghuvanshi commented 3 years ago

I tried above and did not work for me , any solution for this issue , even i am getting 403 . > Could not GET 'https://dl.bintray.com/underdark/android/io/underdark/underdark/maven-metadata.xml'. Received status code 403 from server: Forbidden

HZSamir commented 2 years ago

@Awnage I came back to an old project to be confronted by this issue. Is there any way to fix this?

Awnage commented 2 years ago

@Unforgiven-wanda I managed to find an old copy of the files and placed them on an internal server. I modified the maven path to look for the files there instead of out on bintray. Alas I no longer work for my previous company so I don't have access to the specific files anymore.