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

Build failed for Android, when the version target 4.3.5 or 4.3.6 #153

Closed
mickeylam opened this issue Jan 11, 2021 · 17 comments · Fixed by #154
Closed

Build failed for Android, when the version target 4.3.5 or 4.3.6 #153

mickeylam opened this issue Jan 11, 2021 · 17 comments · Fixed by #154
Assignees

Comments

@mickeylam
Copy link

"react-native": "0.61.2",
"react-native-wifi-reborn": "^4.3.3",

When I set to 4.3.3, the build is successful.

Error:

Task :react-native-wifi-reborn:generateDebugBuildConfig
1756 > Task :react-native-wifi-reborn:javaPreCompileDebug
1757 > Task :react-native-wifi-reborn:compileDebugJavaWithJavac FAILED
1758 /builds/mobile/universal-app/node_modules/react-native-wifi-reborn/android/src/main/java/com/reactlibrary/rnwifi/RNWifiModule.java:27: error: cannot find symbol
1759 import com.reactlibrary.rnwifi.errors.GetCurrentWifiSSIDErrorCodes;
1760 ^
1761 symbol: class GetCurrentWifiSSIDErrorCodes
1762 location: package com.reactlibrary.rnwifi.errors
1763 /builds/mobile/universal-app/node_modules/react-native-wifi-reborn/android/src/main/java/com/reactlibrary/rnwifi/RNWifiModule.java:310: error: package GetCurrentWifiSSIDErrorCodes does not exist
1764 promise.reject(GetCurrentWifiSSIDErrorCodes.CouldNotDetectSSID.toString(), "Not connected or connecting.");
1765 ^
1766 Note: Some input files use or override a deprecated API.
1767 Note: Recompile with -Xlint:deprecation for details.
1768 2 errors
1769 FAILURE: Build failed with an exception.
1770 * What went wrong:
1771 Execution failed for task ':react-native-wifi-reborn:compileDebugJavaWithJavac'.
1772 > Compilation failed; see the compiler error output for details.

@ujjwalsayami
Copy link

I'm having trouble using latest version as well.
"react-native-wifi-reborn": "^4.3.6"

@xralphack
Copy link

4.3.5 can pass, 4.3.6 can not

@lucaguazzaroni
Copy link

Hi, Similar issue here.

info Installing the app...

> Task :react-native-wifi-reborn:compileDebugJavaWithJavac FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
72 actionable tasks: 2 executed, 70 up-to-date
C:\Users\Latitude E7440\Documents\React-Native\lightControlApp\node_modules\react-native-wifi-reborn\android\src\main\java\com\reactlibrary\rnwifi\RNWifiModule.java:27: error: cannot find symbol
import com.reactlibrary.rnwifi.errors.GetCurrentWifiSSIDErrorCodes;
                                     ^
  symbol:   class GetCurrentWifiSSIDErrorCodes
  location: package com.reactlibrary.rnwifi.errors
C:\Users\Latitude E7440\Documents\React-Native\lightControlApp\node_modules\react-native-wifi-reborn\android\src\main\java\com\reactlibrary\rnwifi\RNWifiModule.java:310: error: package GetCurrentWifiSSIDErrorCodes does not exist
            promise.reject(GetCurrentWifiSSIDErrorCodes.CouldNotDetectSSID.toString(), "Not connected or connecting.");
                                                       ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

FAILURE: Build failed with an exception.

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

My enviroment is

  • react-native 0.63.4
  • react-native-wifi-reborn 4.3.6
  • gradle 6.7

@Satyam-code143
Copy link

@lucaguazzaroni

Did you get any solution for this??
I am getting the same problem.

@ujjwalsayami
Copy link

@Satyam-code143 You can use version "react-native-wifi-reborn": "4.3.5"

@Satyam-code143
Copy link

Hey, @ujjwalsayami thank you for your response. I tried installing 4.3.5 version but now I am getting a new error.

> Task :app:processDebugManifest FAILED .

@developer1031
Copy link

https://stackoverflow.com/questions/65695566/task-react-native-wifi-reborncompiledebugjavawithjavac-failed-react-native/65698397#65698397

Check here.

@ujjwalsayami
Copy link

@Satyam-code143 can you post your full error

@Satyam-code143
Copy link

Satyam-code143 commented Jan 13, 2021

@ujjwalsayami Here is my error:

MainProblem

@lucaguazzaroni
Copy link

lucaguazzaroni commented Jan 13, 2021

@lucaguazzaroni

Did you get any solution for this??
I am getting the same problem.

@Satyam-code143

Hi! The problem was that GetCurrentWifiSSIDErrorCodes was a Kotlin file.

The solution:

  1. Go to /node_module/react-native-wifi-reborn/android/src/main/java/com/reactlibrary/rnwifi/erros

  2. Change the extension of GetCurrentWifiSSIDErrorCodes.kt to GetCurrentWifiSSIDErrorCodes.java. And then
    change the file content for this

package com.reactlibrary.rnwifi.errors;

public enum GetCurrentWifiSSIDErrorCodes {
    /**
     * Not connected or connecting.
     */
    CouldNotDetectSSID,
}
  1. Run again
npx react-native run-android

@Satyam-code143
Copy link

Satyam-code143 commented Jan 13, 2021

@lucaguazzaroni

@lucaguazzaroni
Did you get any solution for this??
I am getting the same problem.

@Satyam-code143

Hi! The problem was that GetCurrentWifiSSIDErrorCodes was a Kotlin file.

The solution:

1. Go to /node_module/react-native-wifi-reborn/android/src/main/java/com/reactlibrary/rnwifi/erros

2. Change the extension of GetCurrentWifiSSIDErrorCodes.kt to GetCurrentWifiSSIDErrorCodes.java. And then
   change the file content for this
package com.reactlibrary.rnwifi.errors;

public enum GetCurrentWifiSSIDErrorCodes {
    /**
     * Not connected or connecting.
     */
    CouldNotDetectSSID,
}
1. Run again
npx react-native run-android

Hey! I tried this but I got this error!!

> Task :app:processDebugManifest FAILED

MainProblem

@lucaguazzaroni
Copy link

@lucaguazzaroni

@lucaguazzaroni
Did you get any solution for this??
I am getting the same problem.

@Satyam-code143
Hi! The problem was that GetCurrentWifiSSIDErrorCodes was a Kotlin file.
The solution:

1. Go to /node_module/react-native-wifi-reborn/android/src/main/java/com/reactlibrary/rnwifi/erros

2. Change the extension of GetCurrentWifiSSIDErrorCodes.kt to GetCurrentWifiSSIDErrorCodes.java. And then
   change the file content for this
package com.reactlibrary.rnwifi.errors;

public enum GetCurrentWifiSSIDErrorCodes {
    /**
     * Not connected or connecting.
     */
    CouldNotDetectSSID,
}
1. Run again
npx react-native run-android

Hey! I tried this but I got this error!!

> Task :app:processDebugManifest FAILED

MainProblem

Maybe if you try with 4.3.6 version? In the comment you made above this error showed up when you changed to 4.3.5 version.

@Satyam-code143
Copy link

Satyam-code143 commented Jan 13, 2021

@lucaguazzaroni

No the error comes for both the versions.
For 4.3.6 and also for 4.3.5

@Satyam-code143
Copy link

@lucaguazzaroni
Hey!! Thank You very much!!

Your answer helped a lot. I did get the above mentioned Error. > Task :app:processDebugManifest FAILED I did find solution for that. My minSdkVersion was lower, it was 16 and was asking for 21. I made the changes in build.gradle. The ref link for the same.

@ujjwalsayami and @crazypioneer thank you for your help.

@mickeylam mickeylam changed the title Build failed for Android, when the version target ^4.3.3 Build failed for Android, when the version target 4.3.5 or 4.3.6 Jan 14, 2021
@eliaslecomte
Copy link
Collaborator

eliaslecomte commented Jan 14, 2021

Looks like I was to enthusiastic on mixing Kotlin and Java. Let me fix this.

@Asharuddin-90
Copy link

I am getting build failed previously I was using version 4.7.0 and it was working fine but now when I upgrade it to 4.10.1(latest)

Then I facing issue while building debug

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • Where:
    Build file '/home/viraj/Desktop/Qqueridoo/qeridoo-app/node_modules/react-native-wifi-reborn/android/build.gradle' line: 19

  • What went wrong:
    A problem occurred evaluating project ':react-native-wifi-reborn'.

Could not set unknown property 'namespace' for extension 'android' of type com.android.build.gradle.LibraryExtension.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    ==============================================================================

2: Task failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':react-native-wifi-reborn'.

compileSdkVersion is not specified. Please add it to build.gradle

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    ==============================================================================

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9.4/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 5s

can someone help me?

@lukiinhas1616
Copy link

@Asharuddin-90 any update to this issue?

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

Successfully merging a pull request may close this issue.

9 participants