I just want to get started, can someone help me?
FAILURE: Build failed with an exception.
Installed Build Tools revision 33.0.0 is corrupted. Remove and install again using the SDK Manager.
On Windows: I think this has to do with %LOCALAPPDATA%\Android\Sdk\build-tools\33.0.0 only containing:
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 1/14/2023 2:52 PM renderscript
-a---- 1/14/2023 5:24 PM 0 listing.txt
-a---- 1/14/2023 2:52 PM 18339 package.xml
And %LOCALAPPDATA%\Android\Sdk\build-tools\33.0.1 containing:
Directory: C:\Users\wardb\AppData\Local\Android\Sdk\build-tools\33.0.1
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 1/14/2023 2:58 PM lib
d----- 12/13/2022 9:19 PM lib64
d----- 12/13/2022 9:19 PM lld-bin
d----- 12/13/2022 9:19 PM renderscript
-a---- 12/13/2022 9:19 PM 1686296 aapt.exe
-a---- 12/13/2022 9:19 PM 3924248 aapt2.exe
-a---- 12/13/2022 9:19 PM 343 aarch64-linux-android-ld.exe
-a---- 12/13/2022 9:19 PM 3331352 aidl.exe
-a---- 12/13/2022 9:19 PM 3233 apksigner.bat
-a---- 12/13/2022 9:19 PM 343 arm-linux-androideabi-ld.exe
-a---- 12/13/2022 9:19 PM 253208 bcc_compat.exe
-a---- 12/13/2022 9:19 PM 15149 core-lambda-stubs.jar
-a---- 12/13/2022 9:19 PM 3189 d8.bat
-a---- 12/13/2022 9:19 PM 965400 dexdump.exe
-a---- 12/13/2022 9:19 PM 3189 dx.bat
-a---- 12/13/2022 9:19 PM 343 i686-linux-android-ld.exe
-a---- 12/13/2022 9:19 PM 852760 libbcc.dll
-a---- 12/13/2022 9:19 PM 513816 libbcinfo.dll
-a---- 12/13/2022 9:19 PM 17777944 libclang_android.dll
-a---- 12/13/2022 9:19 PM 27555608 libLLVM_android.dll
-a---- 12/13/2022 9:19 PM 81176 libwinpthread-1.dll
-a---- 1/14/2023 5:25 PM 0 listing.txt
-a---- 12/13/2022 9:19 PM 274200 lld.exe
-a---- 12/13/2022 9:19 PM 1370392 llvm-rs-cc.exe
-a---- 12/13/2022 9:19 PM 343 mipsel-linux-android-ld.exe
-a---- 12/13/2022 9:19 PM 2789358 NOTICE.txt
-a---- 12/13/2022 9:19 PM 18343 package.xml
-a---- 12/13/2022 9:19 PM 17 runtime.properties
-a---- 12/13/2022 9:19 PM 63 source.properties
-a---- 12/13/2022 9:19 PM 1632536 split-select.exe
-a---- 12/13/2022 9:19 PM 343 x86_64-linux-android-ld.exe
-a---- 12/13/2022 9:19 PM 837912 zipalign.exe
android\build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "33.0.1"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 33
if (System.properties['os.arch'] == "aarch64") {
// For M1 Users we need to use the NDK 24 which added support for aarch64
ndkVersion = "24.0.8215888"
} else {
// Otherwise we default to the side-by-side NDK version from AGP.
ndkVersion = "21.4.7075529"
}
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.2.1")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("de.undercouch:gradle-download-task:5.0.1")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup "com.facebook.react"
}
}
google()
maven { url 'https://www.jitpack.io' }
}
}
package.json
{
"name": "PiekverbruikMonitor",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@notifee/react-native": "^7.3.0",
"react": "18.1.0",
"react-native": "0.70.4"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.6.3",
"eslint": "^7.32.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "0.72.3",
"react-test-renderer": "18.1.0"
},
"jest": {
"preset": "react-native"
}
}
Error occurs when running: npx react-native run-android
info Starting JS server...
info Installing the app...
Starting a Gradle Daemon, 2 incompatible and 3 stopped Daemons could not be reused, use --status for details
> Configure project :notifee_react-native
:notifee_react-native @notifee/react-native found at C:\Projects\PiekverbruikMonitor\node_modules\@notifee\react-native
:notifee_react-native package.json found at C:\Projects\PiekverbruikMonitor\node_modules\@notifee\react-native\package.json
:notifee_react-native:version set from package.json: 7.3.0 (7,3,0 - 7003000)
:notifee_react-native:android.compileSdk using custom value: 33
:notifee_react-native:android.targetSdk using custom value: 33
:notifee_react-native:android.minSdk using custom value: 21
:notifee_react-native:reactNativeAndroidDir C:\Projects\PiekverbruikMonitor\node_modules\react-native\android
WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33
This Android Gradle plugin (7.2.1) was tested up to compileSdk = 32
This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=33
to this project's gradle.properties
The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 33
WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33
This Android Gradle plugin (7.2.1) was tested up to compileSdk = 32
This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=33
to this project's gradle.properties
The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 33
Observed package id 'system-images;android-33;google_apis;x86_64' in inconsistent location 'C:\Users\wardb\AppData\Local\Android\Sdk\system-images\android-33\google_apis\x86_64-2' (Expected 'C:\Users\wardb\AppData\Local\Android\Sdk\system-images\android-33\google_apis\x86_64')
Build-tool 33.0.0 is missing AAPT at C:\Users\wardb\AppData\Local\Android\Sdk\build-tools\33.0.0\aapt.exe
Observed package id 'system-images;android-33;google_apis;x86_64' in inconsistent location 'C:\Users\wardb\AppData\Local\Android\Sdk\system-images\android-33\google_apis\x86_64-2' (Expected 'C:\Users\wardb\AppData\Local\Android\Sdk\system-images\android-33\google_apis\x86_64')
Observed package id 'system-images;android-33;google_apis;x86_64' in inconsistent location 'C:\Users\wardb\AppData\Local\Android\Sdk\system-images\android-33\google_apis\x86_64-2' (Expected 'C:\Users\wardb\AppData\Local\Android\Sdk\system-images\android-33\google_apis\x86_64')
Build-tool 33.0.0 is missing AAPT at C:\Users\wardb\AppData\Local\Android\Sdk\build-tools\33.0.0\aapt.exe
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
5 actionable tasks: 5 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':notifee_react-native:compileDebugAidl'.
> Installed Build Tools revision 33.0.0 is corrupted. Remove and install again using the SDK Manager.
* 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.
* 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 53s
at makeError (C:\Projects\PiekverbruikMonitor\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at C:\Projects\PiekverbruikMonitor\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (C:\Projects\PiekverbruikMonitor\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Projects\PiekverbruikMonitor\node_modules\@react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.
I copied the entire 33.0.1 to 33.0.0 and it seems to work idk why
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.