> Task :invertase_react-native-apple-authentication:parseDebugLibraryResources FAILED - java

**I have a problem when im starting a proj in Android studio using Yarn mb someone had the same problem **
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1440 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...
Configure project :app
Error 'Plugin-Version' of 'unspecified' for 'com.android.build.gradle.AppPlugin#76a4096' is not a valid version number
OneSignal Warning: Could not get AGP plugin version
Task :invertase_react-native-apple-authentication:parseDebugLibraryResources 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.5/userguide/command_line_interface.html#sec:command_line_warnings
8 actionable tasks: 2 executed, 6 up-to-date
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':invertase_react-native-apple-authentication:parseDebugLibraryResources'.
Could not resolve all files for configuration ':invertase_react-native-apple-authentication:androidApis'.
Failed to transform android.jar to match attributes {artifactType=android-platform-attr, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for PlatformAttrTransform: /Users/admin/Library/Android/sdk/platforms/android-29/android.jar.
> /Users/admin/Library/Android/sdk/platforms/android-29/android.jar (No such file or directory)
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 9s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I don't know if this applies to your exact situation, but I had a similar error and solved it by explicity specifying the Kotlin version in the buildscript block in build.gradle, like this:
buildscript {
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "22.1.7171670"
kotlinVersion = "1.5.30"
androidXAnnotation = "1.1.0"
androidXBrowser = "1.0.0"
googlePlayServicesVersion = "17.+"
}
repositories {
jcenter()
mavenCentral()
maven { url 'https://www.jitpack.io' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
}
}
I was able to find the Kotlin version in Android Studio under Preferences -> Plugins.

Related

I can't do npx react-native run-android, Java error; Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. LINUX

There were lots of Mapping new... logs, so i deleted a big chunk, because I exceeded the available characters
(I'm not sure if this is the problem) It says it's something related to the licences, but I already accepted them all, as far as I know.
In the images I show you what I've installed throught Android Studio, everything seems fine.
npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 863 file(s) to forward-jetify. Using 2 workers...
info JS server already running.
/bin/sh: 1: /home/u/platform-tools/adb: not found
info Launching emulator...
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Observed package id 'system-images;android-29;google_apis;x86' in inconsistent location '/home/u/Android/Sdk/system-images/android-29/google_apis/x86' (Expected '/home/u/system-images/android-29/google_apis/x86')
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Observed package id 'tools' in inconsistent location '/home/u/Android/Sdk/tools' (Expected '/home/u/tools')
Checking the license for package Android SDK Build-Tools 30.0.2 in /home/u/licenses
Warning: License for package Android SDK Build-Tools 30.0.2 not accepted.
Checking the license for package Android SDK Platform 30 in /home/u/licenses
Warning: License for package Android SDK Platform 30 not accepted.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;30.0.2 Android SDK Build-Tools 30.0.2
platforms;android-30 Android SDK Platform 30
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: /home/u
* 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 1m 38s
error Failed to install the app. Please accept all necessary Android SDK licenses using Android SDK Manager: "$ANDROID_HOME/tools/bin/sdkmanager --licenses".
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;30.0.2 Android SDK Build-Tools 30.0.2
platforms;android-30 Android SDK Platform 30
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: /home/u
* 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 1m 38s
at makeError (/home/u/Desktop/workdir/Math_App/mathapp/node_modules/#react-native-community/cli-platform-android/node_modules/execa/index.js:174:9)
at /home/u/Desktop/workdir/Math_App/mathapp/node_modules/#react-native-community/cli-platform-android/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (/home/u/Desktop/workdir/Math_App/mathapp/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
at async Command.handleAction (/home/u/Desktop/workdir/Math_App/mathapp/node_modules/#react-native-community/cli/build/index.js:192:9)
info Run CLI with --verbose flag for more details.
It basically indicates it's missing build-tools;30.0.2 Android SDK Build-Tools 30.0.2 platforms;android-30 Android SDK Platform 30
Install them throught Android-Studio, and everything should work.
Addionaty to that, I'd another problem (probably unrelated to the one on top, but I'll still add it here)
So, now if I try again npx react-native run-android the following error pops us
[adb]: Cannot run program "/home/u/platform-tools/adb": error=2, No such file or directory
platform-tools lives inside ~/Android/Sdk, not inside ~/ .
Basically it means that the path is wrong. Fix for that is here

gradle build.gradle issue with "version:"(forge modding)

I am 10000000000% new to coding forge mods.
I am trying to run this command:
./gradlew setupdecompworkspace
I typed this in the terminal after going through the file path.
I get this error message:
* What went wrong:
Could not compile build file '/Users/fred/Desktop/Mods-In-Progress/LearningMod/build.gradle'.
> startup failed:
build file '/Users/fred/Desktop/Mods-In-Progress/LearningMod/build.gradle': 15: unexpected token: 16.5 # line 15, column 13.
version =‘1.16.5-1.0.0’
^
1 error
* 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 5s
FC-MBP3-3:LearningMod MYNAME$
My build.gradle file is this(I am not showing the whole thing btw):
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '4.1.+', changing: true
}
}
apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
version =‘1.16.5-1.0.0’
group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'modid'
So, my question is how do I fix the error message. I have tried everything I can think of. I am following this tutorial: https://www.youtube.com/watch?v=JFVFqZo5t5Q
Thanks,
CreativeDrone
Also, I have an old mac. around OS version 10.8 Owo
Gonna get a new one soon
OK SO SOMEONE FIXED THIS PROBLEM BUT I AM STILL GETTING AN ERROR CODE THE ERROR CODE IS IN THE COMMENTS.
You need to use '', not ‘’. Replace that line with version ='1.16.5-1.0.0'.

how do i solve my unique java error: invalid source release: 1.- [duplicate]

This question already has answers here:
Error:java: invalid source release: 8 in Intellij. What does it mean?
(18 answers)
Closed 2 years ago.
I know there are lots of similar questions to this one, but they don't cover my situation: "1.-", where the - isn't a placeholder or a negative number but is exactly what the error log states.
10:01:41: Executing task 'build'...
Starting Gradle Daemon...
Gradle Daemon started in 4 s 748 ms
> Configure project :
Java: 14.0.1 JVM: 14.0.1+7(Oracle Corporation) Arch: amd64
New Dep: net.minecraftforge:forge:1.16.4-35.1.37_mapped_snapshot_20201028-1.16.3
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> error: invalid source release: 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.3/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 33s
1 actionable task: 1 executed
10:02:18: Task execution finished 'build'.
I tried several solutions to questions containing exact numbers describing what source release is invalid, but none of them worked. It also worked fine yesterday and stopped working after I restarted IntelliJ.
It turned out that while closing intellij intellij rewrote sowmething in my build.gradle:
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' + '' // Need this here so eclipse task generates correctly.
should be it
but it was :
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.-' +
'' // Need this here so eclipse task generates correctly.

Gradle download sources failed

I'm using Gradle build tool and I can't get the source code and docs for spark-core.
I've already searched and applied:
idea {
project {
jdkName = '1.8'
languageLevel = '1.8'
}
module {
downloadJavadoc = true
downloadSources = true
}
}
But it still doesn't work for me. I suppose I'm missing something like rebuild the whole project or download just these pieces.
I applied ./gradlew cleanIdea idea as well.
When I try to click with pressed command on SparkConf.class I press Download Sources I get Sources not found for: org.apache.spark:spark-core_2.12:2.4.5
And the result from the run tab:
21:11:29: Executing task 'DownloadSources'...
:DownloadSources FAILED
BUILD FAILED
Total time: 0.124 secs
FAILURE: Build failed with an exception.
* Where:
Initialization script '/private/var/folders/06/97bzw1l51r59l65thfzs7hd80000gn/T/ijmiscinit1.gradle' line: 14
* What went wrong:
Execution failed for task ':DownloadSources'.
> Could not resolve all dependencies for configuration ':downloadSourcesFrom_MavenRepo_91653a2f-0439-4794-b77a-3812f9926728'.
> java.lang.NullPointerException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
21:11:29: Task execution finished 'DownloadSources'.
Here is 2 pretty long task outputs:
DownloadSources --info: https://pastebin.com/D07JmGXT
DownloadSources --stacktrace: https://pastebin.com/6ceKhwrk
Idea.log https://pastebin.com/EQcDxPwb
Latest public Intellij build: 2020.1.1 installed via Toolbox
Latest MacOS: 10.15.4
Java 1.8 jdk-8u251-macosx-x64.dmg, downloaded from oracle.com
Could you please help me to realize what should I do to fix it?
The problem belongs to Scala plugin.
If you face this issue, it doesn't matter on build tool you are using Maven or Gradle probably installation of the Scala plugin solves your problem.
My Intellij report: https://intellij-support.jetbrains.com/hc/en-us/requests/2686145
Well-known bug: https://youtrack.jetbrains.com/issue/IDEA-127193

Build failure for JavaFX android app using the gluon mobile plugin

I just started a new gluon mobile multi view project with FXML and tried to run it before changing anything (apart from updating the jfxmobile-plugin version in the build.gradle file from 1.2.0 to 1.3.2). it works fine on desktop, but when i try to run the androidinstall gradle task (with my android phone connected) it fails. It gives me the following error:
:mergeClassesIntoJar
:shrinkMultiDexComponents
:createMainDexList
:writeInputListFile
[ant:java] Java Result: 1
:dex FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':dex'.
> org.gradle.api.GradleException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
my build.gradle file:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.2'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'com.gluonapplication.GluonApplication'
dependencies {
compile 'com.gluonhq:charm:4.2.0'
}
jfxmobile {
downConfig {
version = '3.1.0'
// Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
plugins 'display', 'lifecycle', 'statusbar', 'storage'
}
android {
manifest = 'src/android/AndroidManifest.xml'
}
}
operating system: Windows 10.
Please let me know if any additional information is needed to determine the cause of the problem. Thank you.
gradlew --info android log:
http://pastebin.com/yNZbZcVk
Based on your log, I noticed you were using a 32 bits JDK on a 64 bits OS:
Starting process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_101\bin\java.exe''. Working directory: D:\Android_Projects\GluonMobile-MultiViewProjectwithFXML Command: C:\Program Files (x86)\Java\jdk1.8.0_101\bin\java.exe ...
By default, the jfxmobile plugin sets 2 GB for the JVM Xmx option on Android, and considering that on a 32 bits OS that won't be possible to allocate, the solution is setting a lower value.
Based on this line of code, you can set:
android {
dexOptions {
javaMaxHeapSize '1g'
}
}
Or maybe a little bit more (1.5g or so?).
Note that this will be solved if you use a 64 bits JDK. Make sure you update your JAVA_HOME environment variable accordingly, as you won't need to reduce the memory for your process.

Categories

Resources