Closed sznrbrt closed 7 years ago
@ivpusic I tried making an Android build yesterday (after you'd asked me to check about #83 on Android) and got this exact issue.
try to apply changes from https://github.com/ivpusic/react-native-image-crop-picker/commit/6d59b8408aec74ddcd50e9139879355ff517329b on your project.
@sznrbrt any updates here?
@ivpusic Just had the time to check it quickly, but still having issues. Although Im not sure anymore its not on my side.
Build file '/Users/[username]/temp/CropTest/android/app/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0
probably this time is something on your side.
Faced the same issue. Making the recommended changes solved this issue for me.
The same issue,
* Where:
Build file 'D:\Frank\workspace\ReactProject\android\app\build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : U
nsupported major.minor version 52.0
try suggested on 6d59b84 but still the same error...
Please help
Currently, facing this problem and I implemented the changes recommended above but no solution yet.
My solution to the problem was ( using Windows):
Set ANDROID_HOME variable Path (Obviously) Check my Java for Updates and update Change the JAVA_HOME variable Path
Using: windows 10
I am experiencing the same error on a fresh install of react-native.
react-native init AwesomeProject
cd AwesomeProject
react-native run-android // at this point, I have android emulator from android studio up and running
The output I got was:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\aprilpineda\Documents\projects\mobile\AwesomeProject\android\app\build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0
* 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: 24.768 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
I already have a set
ANDROID_HOME =C:\Users\aprilpineda\AppData\Local\Android\sdk
JAVA_HOME = C:\Program Files (x86)\Java\jre1.8.0_141
my Package.json is as follows:
{
"name": "AwesomeProject",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.0.0-alpha.12",
"react-native": "0.48.4"
},
"devDependencies": {
"babel-jest": "21.0.2",
"babel-preset-react-native": "4.0.0",
"jest": "21.1.0",
"react-test-renderer": "16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
}
}
I also have applied this -> https://github.com/ivpusic/react-native-image-crop-picker/commit/6d59b8408aec74ddcd50e9139879355ff517329b
I fixed it by downloading JDK 1.8.0
. Then I used that instead of JRE
.
Build file 'D:\Frank\workspace\ReactProject\android\app\build.gradle' line: 1 这个问题,更新到1.8之后,把系统变量JAVA_HOME 的地址指向本地安装的jdk1.8对应目录就行了
Version
Platform
Actual behaviour
Clean project produces this error on android: FAILURE: Build failed with an exception.
Steps to reproduce
Attachments
`FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring project ':app'.
BUILD FAILED
Total time: 8.504 secs Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/android-setup.html`