简体   繁体   中英

React-native app: Build failed with an exception error

I was making an app, but suddenly my app stopped working. All apps was running properly before. But suddenly now, this happens. Now, when i try to run app, It's giving me the error:

" > Task :app:transformClassesWithDexBuilderForDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\zains\.gradle\caches\transforms-1\files-1.1\firebase-analytics-impl-11.8.0.aar\5f122df5deada8f908914f5bd04e05ad\jars\classes.jar "

here is the screenshot:

在此处输入图片说明

在此处输入图片说明

Can anyone help me about this Please

just do this :

in main project folder ,in terminal type

cd android

then type this

./gradlew clean

or try this, run this code in your project folder

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

and after that

cd android && ./gradlew clean && cd .. && react-native run-android

then build your app again

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM