When I tried to build this project, I get this error printed in my console.
But, when I try building other projects, no error happens. Why is that?
Everything was working fine 2 days ago.
Here is the error,
unning "flutter pub get" in SampleApp...
Launching lib\main.dart on Android SDK built for x86 in debug mode...
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.3.0/lib/src/top_level.dart:1:8: Error: Not found: 'dart:html'
import 'dart:html';
^
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.2/lib/js.dart:8:1: Error: Not found: 'dart:js'
export 'dart:js' show allowInterop, allowInteropCaptureThis;
^
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.2/lib/js_util.dart:8:1: Error: Not found: 'dart:js_util'
export 'dart:js_util';
^
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:26: Error: Type 'DiagnosticableMixin' not found.
class PictureStream with DiagnosticableMixin {
^^^^^^^^^^^^^^^^^^^
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:44: Error: Type 'DiagnosticableMixin' not found.
abstract class PictureStreamCompleter with DiagnosticableMixin {
^^^^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script 'E:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 896
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'E:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* 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
BUILD FAILED in 4m 13s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
I tried running flutter clean, but it didn't help.
It happened because of the 'firebase' package.
i think there are some errors in it.
Related
How can i fix this issue in my code? does anyone can help me how can I fix this error I am using latest version of react native I installed the project yesterday only but still its giving me this error came after i installed a package called "react-native-vision-camera" you can check that here https://mrousavy.com/react-native-vision-camera/docs/guides/ i followed every step but still this error came.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
The Android Gradle plugin supports only kotlin-android-extensions Gradle plugin version 1.6.20 and higher.
The following dependencies do not satisfy the required version:
project ':react-native-vision-camera' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30
* 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.
BUILD FAILED in 36s
For example...
tns plugin add nativescript-simple-libsodium
.
.
.
Build file '/Users/******/helloworld/platforms/android/app/build.gradle' line: 575
A problem occurred configuring project ':app'.
SSL peer shut down incorrectly
Another example...
tns plugin add nativescript-crypto
...
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file '/Users/****/helloworld/platforms/tempPlugin/nativescript_crypto/build.gradle' line: 231
* What went wrong:
A problem occurred evaluating root project 'nativescript_crypto'.
> Could not find method compile() for arguments [com.madgag.spongycastle:core:1.56.0.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
* 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.
-----------
* Where:
Build file '/Users/****/helloworld/platforms/tempPlugin/nativescript_crypto/build.gradle' line: 210
* What went wrong:
A problem occurred configuring root project 'nativescript_crypto'.
> Could not get unknown property 'generateReleaseBuildConfig' for root project 'nativescript_crypto' of type org.gradle.api.Project.
* 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
BUILD FAILED in 1s
Failed to build plugin nativescript-crypto :
Error: Command ./gradlew failed with exit code 1
The above errors appear after I execute tns run android. After you execute tns plugin add do you need to make another things? If you remove that added plugin is OK. The error is the same for npm install And tns plugin add.
I am creating an app that uses webview. I installed and imported the webview and when using it, app was not installed in the android emulator. Without webview app installing correctly.
I tried by creating another project for example ,same error returns.
Here is the error by using webview:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file 'F:\FirstProject\node_modules\react-native-webview\android\build.gradle' line: 35
* What went wrong:
A problem occurred evaluating project ':react-native-webview'.
> org/jetbrains/kotlin/cli/common/PropertiesKt
* 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-webview'.
> 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
BUILD FAILED in 15s
I am using java version: java 15.0.2
compileSdkVersion : 30
I have completed my android project on React Native and finding this error while compiling the project for Signed Apk.
> Task :react-native-video:compileReleaseJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
/Users/kedardave/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/e10f37597a16932be24db019d75c890a/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
/Users/kedardave/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/e10f37597a16932be24db019d75c890a/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.
/Users/kedardave/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/e10f37597a16932be24db019d75c890a/res/values-v26/values-v26.xml:17:5-93:AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
/Users/kedardave/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/e10f37597a16932be24db019d75c890a/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontStyle not found.
/Users/kedardave/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/e10f37597a16932be24db019d75c890a/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/font not found.
/Users/kedardave/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/e10f37597a16932be24db019d75c890a/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontWeight not found.
error: failed linking references.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-keep-awake:verifyReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* 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
BUILD FAILED in 2m 42s
132 actionable tasks: 100 executed, 32 up-to-date
These are the problems I am getting, these are about resources and I don't know how to resolve it. It seems like Version issue with targetSDK but can't figure out
Change supportLibVersion of build.gradle of your project to 27.1.1
Edit
How about adding below code to build.gradle of project,
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 27
buildToolsVersion "27.1.1"
}
}
}
}
For some reason, my android phonegap build fails every time I try to run it.I can’t seem to figure out what the problem is.
I am using the latest version of Cordova (5.3.3) and downloaded the correct SDK for android using Android studio (I think).
Any ideas what I’m doing wrong?
Here are my CLI logs:
FAILURE:
Build failed with an exception.
* What went wrong:
Execution failed for task ':prepareDebugDependencies'.
>
javax.xml.xpath.XPathExpressionException: org.xml.sax.SAXParseException; lineNumber: 41; columnNumber: 94; The prefix "tools" for attribute "tools:overrideLibrary" associated with an element type "uses-sdk" is not bound.
* Try:
Run with --stacktrace
option to get the stack trace. Run with --info
or
--debug
option to get more log output.
BUILD FAILED
Total time: 4.325 secs
/Users/macuser/Desktop/bacon copy/bacontest/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /Users/macuser/Desktop/bacon copy/bacontest/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/macuser/Desktop/bacon copy/bacontest/platforms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR building one of the platforms: Error: /Users/macuser/Desktop/bacon copy/bacontest/platforms/android/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: /Users/macuser/Desktop/bacon copy/bacontest/platforms/android/cordova/build: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:817:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:
5)