I have successfully imported Eclipse Project into Android Studio. I have added library projects as modules to that project. Gradle build is also successful but when I run app, it says "Gradle build finished with 1 error(s) in 23 sec" and error is :
Error:Execution failed for task ':app:dexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_21\bin\java.exe'' finished with non-zero exit value 2
Any solution to this problem?
I am using Android Studio v1.1.0
This error occurs when the project has not been refreshed (Clean and Build) after adding libraries.To resolve it just CLEAN and it will run.
Related
I installed Qt 6.3 ,Android Studio 7 (Chipmunk 2021.2.1),java jdk-11.0.15+10 NDK Version: 22.1.7171670).The Android build Platform Sdk 32.
The jdk does not have jre.
A screenshot is attached.
I am using gradle 5.6.4
When I deploy to Android it fails with the following error log (compile output).
"
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\o\Documents\build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug\android-build\build.gradle' line: 17
What went wrong:
A problem occurred evaluating root project 'android-build'.
Failed to apply plugin [id 'com.android.internal.version-check']
Minimum supported Gradle version is 7.0.2. Current version is 5.6.4. If using the gradle wrapper, try editing the distributionUrl in C:\Users\o\Documents\build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug\android-build\gradle\wrapper\gradle-wrapper.properties to gradle-7.0.2-all.zip
Try:
Run with --stacktrace option to get the stack trace. Run with --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 4m 17s
Building the android package failed!
18:55:35: The process "C:\Qt\6.3.0\mingw_64\bin\androiddeployqt.exe" exited with code 14.
Error while building/deploying project TrackGate (kit: Android Qt 6.3.0 Clang armeabi-v7a)
When executing step "Build Android APK"
18:55:36: Elapsed time: 06:45. "
when i change to gradle7.0.2 i get
"adb.exe: device 'DVKS100I21060300956' not found
...
Installing to device failed!
19:11:44: The process "C:\Qt\6.3.0\mingw_64\bin\androiddeployqt.exe" exited with code 16.
19:11:44: Installing the app failed with an unknown error.
...
19:11:44: The command "C:\Users\o\AppData\Local\Android\Sdk\platform-tools\adb.exe -s DVKS100I21060300956 pull /system/bin/app_process C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/app_process" terminated with exit code 1.
19:11:44: Package deploy: Failed to pull "/system/bin/app_process" to "C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/app_process
...
19:11:44: The command "C:\Users\o\AppData\Local\Android\Sdk\platform-tools\adb.exe -s DVKS100I21060300956 pull /system/bin/app_process32 C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/app_process" terminated with exit code 1.
19:11:44: Package deploy: Failed to pull "/system/bin/app_process32" to "C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/app_process".
...
19:11:44: The command "C:\Users\o\AppData\Local\Android\Sdk\platform-tools\adb.exe -s DVKS100I21060300956 pull /system/bin/linker C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/linker" terminated with exit code 1.
19:11:44: Package deploy: Failed to pull "/system/bin/linker" to "C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/linker".
...
19:11:44: The command "C:\Users\o\AppData\Local\Android\Sdk\platform-tools\adb.exe -s DVKS100I21060300956 pull /system/lib/libc.so C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/libc.so" terminated with exit code 1.
...
19:11:44: Package deploy: Failed to pull "/system/lib/libc.so" to "C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/libc.so".
Error while building/deploying project TrackGate (kit: Android Qt 6.3.0 Clang armeabi-v7a)
When executing step "Deploy to Android device"
"
Assist in setting-up the environment because an android device is connected via usb.
I finally got it to deploy to device by uninstalling everything related to Qt, Java and and Android Studio. I reinstalled Qt 6.3.1 and used Qt to install Java and Android Studio .I made sure that the Arm64 v8 system image for API 30 is available in Android Studio.
This video link "https://www.youtube.com/watch?v=XrQ_j6VOnzo" helps with Qt 6 installation .
This video link "https://www.youtube.com/watch?v=WafdjRhyDRc" helps with Android Studio installation
I have set proper paths and installed plugins (Dart and Flutter) in my Android Studio but I have always seemed this error below and same in Visual Studio Code?
Downloading Gradle Wrapper... 0.6s
Launching lib\main.dart on RMX1971 in debug mode...
Running Gradle task 'assembleDebug'...
Downloading Gradle Wrapper... 0.6s
Exception: Gradle task assembleDebug failed with exit code -1
Please Check
Android Studio -> New -> ProjectStructure -> Modules.
Please check the full Project Structure.
I hope it helps.
I am working on a jenkins build server for an android project that uses gradle as build-tool.
The jenkins job checkouts the same git branch as my android studio project and tries to build but fails at one point whereas when I build the project with android studio, I do not get any errors. Where could be reason for this?
Task :app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed
C:\Windows\System32\config\systemprofile.gradle\caches\transforms-2\files-2.1\9fe834a1339d0af409079f662a365996\res\drawable\abc_btn_colored_material.xml: error: file not found.
There is no error when I build the project with android studio :(
There is a problem as I want to use api library generated by swagger-codegen in my flutter project.
What I do:
Creating new project.
Generating my_api using swagger-codegen.
Adding created library as it is showen in readme.md form generated code.
Adding import package in project.
Pressing get packages button in android studio.
Adding example code as it is shown in readme.md from generated code.
(Until now everything works fine)
Getting an error Not found: dart:html (pasted below).
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running 'gradlew assembleDebug'...
compiler message: dart:html: Error: Not found: dart:html.
Compiler failed on C:\Users\Comarch\AndroidStudioProjects\flutter_with_api\lib\main.dart
FAILURE: Build failed with an exception.
* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 435
* What went wrong:
Execution failed for task ':app:flutterBuildDebug'.
> Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
Finished with error: Gradle build failed: 1
I am using:
swagger-codegen (v. 2.4.0)
flutter (v. 0.5.1-beta)
android studio (v. 3.1.3)
Im trying to run my project in android studio but I get the error message
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Johan\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1
I have no idea what to do. Was able to run the app earlier and dont even know what changed.