即使我手动配置了JDK项目结构文件/项目结构,它仍然显示此错误FAILURE:Build失败并出现异常.
`出了什么问题:任务执行失败':sample:compileReleaseJavaWithJavac'.
找不到tools.jar.请检查C:\ Program Files\Java\jre1.8.0_151是否包含有效的JDK安装
我很困惑为什么它还在寻找C:\ Program Files\Java\jre1.8.0_151而不是JDK
我尝试构建我的 Flutter 应用程序(捆绑包)。
但我有一些问题。
这是我的错误代码:
-Error message
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\user\IdeaProjects\relayWriting\android\app\build.gradle' line: 42
* What went wrong:
A problem occurred evaluating project ':app'.
> No signature of method: build_c3l4fjlvmd1tu5wmv81djoazh.android() is applicable for argument types: (build_c3l4fjlvmd1tu5wmv81djoazh$_run_closure2)
values: [build_c3l4fjlvmd1tu5wmv81djoazh$_run_closure2@7e4ad7b4]
* 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 …Run Code Online (Sandbox Code Playgroud) 我在使用存储来保存用户登录数据时遇到问题。
像这样的场景:登录后,我清除应用程序并尝试再次重新打开它,有时它会打开,有时会在启动屏幕上冻结。这仅发生在发布模式下。
我尝试删除每个包,直到发现登录后使用存储的问题。所以如果我不登录,什么都不会冻结。
我使用了 get_storage 、shared_preferences 和 secure_storage 包,但没有任何改变。颤振2.10.2。
在真实设备上测试
这也是使用过的包
module:
androidX: true # Add this line.
environment:
sdk: ">=2.11.0 <3.0.0"
dependencies:
dio: ^4.0.0
get: ^4.1.4
get_storage:
flutter:
sdk: flutter
dev_dependencies:
flutter_launcher_icons: ^0.9.2
flutter_icons:
android: true
ios: false
image_path: "assets/icons/launcher_icon.png"
flutter_test:
sdk: flutter
name: delivery
description: manager App
version: 1.6.3
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
Run Code Online (Sandbox Code Playgroud)
最后我决定分享详细的希望有人可以提供帮助
运行时出现此错误 react-native run-android
日志:
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Android Gradle Plugin Version - 3.6.3
Gradle Version- 6.0.1
Run Code Online (Sandbox Code Playgroud) android-studio android-sdk-manager react-native react-native-android
尝试使用 android 运行我的 react-native 应用程序时出现以下错误,我不确定为什么,有什么想法吗?
*其中:构建文件“/Users/ahmeeyagoldman/Documents/TikTok/android/app/build.gradle”行:123
没有方法签名:build_26i9j525hbm41pwpexiy08g68.android() 适用于参数类型:(build_26i9j525hbm41pwpexiy08g68$_run_closure1) 值:[build_26i9j525hbm41pwpexiy08g68.android() 文件:My
到目前为止,我已尝试:
如果我尝试另一个项目,我可以使用 react-native 运行一个 android 应用程序,但这个项目抛出错误。需要注意的事情我不确定这是否重要,但这与 AWS 相关。
apply plugin: "com.android.application"
import com.android.build.OutputFile
/**
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
* and bundleReleaseJsAndAssets).
* These basically call `react-native bundle` with the correct arguments during the Android build
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
* bundle directly from the development …Run Code Online (Sandbox Code Playgroud)android method-signature build.gradle android-gradle-plugin react-native