I am getting the following error while trying to run
devkit debug native-android
ERROR
BUILD FAILED
/home/bonnie/adt/sdk/tools/ant/build.xml:597: The following error occurred while executing this line:
/home/bonnie/GameEngines/MyGameClosure/modules/devkit-core/modules/native-android/TeaLeaf/build.xml:7: Source resource does not exist: /home/bonnie/GameEngines/MyGameClosure/modules/devkit-core/modules/native-android/TeaLeaf/local.properties
looking closely I found the local.properties fille is missing.
How can i fix this? what is the reason for it?
copy the local.properties file from build/debug/native-android/local.properties to modules/devkit-core/modules/native-android/TeaLeaf/
cp build/debug/native-android/local.properties modules/devkit-core/modules/native-android/TeaLeaf/
-OR-
change line no. 7 of
modules/devkit-core/modules/native-android/TeaLeaf/buid.xml
to
<loadproperties srcFile="../../../../../build/debug/native-android/local.properties" />
`
Related
I am trying to work with Jenkins however I cannot build the apk with it as I am having issue with AAPT2 and Gradle.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Multiple task action failures occurred:
> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
> Android resource compilation failed
ERROR:C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-3\b478eb984dbbd1317dab9bfd9689b3aa\transformed\appcompat-1.3.0\res\drawable-hdpi-v4\abc_list_divider_mtrl_alpha.9.png: AAPT: error: file not found.
> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
> Android resource compilation failed
ERROR:C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-3\b478eb984dbbd1317dab9bfd9689b3aa\transformed\appcompat-1.3.0\res\drawable-xhdpi-v4\abc_list_divider_mtrl_alpha.9.png: AAPT: error: file not found.
> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
> Android resource compilation failed
ERROR:C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-3\b478eb984dbbd1317dab9bfd9689b3aa\transformed\appcompat-1.3.0\res\drawable-mdpi-v4\abc_list_divider_mtrl_alpha.9.png: AAPT: error: file not found.
I already read tons of SO question that may share same issue to my case saying that it has something to do with the file path being too long but I still cannot find any solution.
UPDATE
I tried to change Android Studio Gradle home similar to what Jenkins is using and received similar error which indicates that it may really have something to do with long file path.
I think the final question will be how to change Jenkins Gradle Home?
You need to replace \ with \\ if you are giving path with jenkins in Windows.
May be if file path is too huge or that is the root cause you can try mounting the directory to a short path
EDIT : Based on your modified question :
Open Jenkins dashboard. Navigate to Manage Jenkins-> Configure System. Under the Global properties section add another environment variable named GRADLE_USER_HOME as shown below.
I ran into this exact issue, but unfortunately changing the GRADLE_USER_HOME environment variable did not help, as aapt2 appeared to ignore the change and still used Windows/system32/... for the cache location.
The problem was how I was running Jenkins as a service. In the service.msc settings, it was set to Log On as a Local System account, which set the USER_HOME variables to C:\Windows\System32. Because of this, the reason the error said that the file did not exist was because Jenkins/gradle did not have access to the System32 folder.
My fix was to change the log on method to 'This account', then enter a user account so Jenkins wasn't logged on as system anymore.
While trying to build sample qt app for android, stuck with below errors.
Command does not exist:
/Users/sungyong/Library/Android/ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-readobj
Command does not exist:
/Users/sungyong/Library/Android/ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-readobj
Command does not exist:
/Users/sungyong/Library/Android/ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-readobj
Command does not exist:
/Users/sungyong/Library/Android/ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-readobj
Command does not exist:
/Users/sungyong/Library/Android/ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-readobj
Command does not exist:
/Users/sungyong/Library/Android/ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-readobj
Command does not exist:
/Users/sungyong/Library/Android/ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-strip
11:26:20: The process
"/Users/sungyong/Qt/5.12.2/android_arm64_v8a/bin/androiddeployqt"
exited with code 9. Error while building/deploying project qtempty
(kit: Android for arm64-v8a (Clang Qt 5.12.2 for Android ARM64-v8a))
When executing step "Build Android APK"
Even though googling correct solution, still have no idea.
What do I check?
There's is no 'llvm-readobj' at this path even though I follow guide.
I've also encountered a similar problem.
The error message was llvm-strip:not found, despite having clang-10 on my Ubuntu system.
But I found llvm-strip-10 in directory /usr/bin, it's not llvm-strip.
So I made soft link llvm-strip --> llvm-strip-10 and it works.
Presumably you need to update your NDK. It's there in a current release.
I'm getting the following error while building Android ROM, either it is AOSP/CyanogenMod
In file included from hardware/ril-caf/libril/RilSapSocket.cpp:21:0:
hardware/ril-caf/libril/RilSapSocket.h:22:55: fatal error: hardware/ril/librilutils/proto/sap-api.pb.h: No such file or directory
#include <hardware/ril/librilutils/proto/sap-api.pb.h>
^
compilation terminated.
When I look into the path in github.com/CyanogenMod and github.com/Android I couldn't find sap-api.pb.h
What could be the problem and how can I resolve it?
I got the same error message, and I tried to find the generated file with find command:
$ find . -name "sap-api.pb.h"
./out/target/product/bacon/gen/STATIC_LIBRARIES/librilutils_static_intermediates/proto/hardware/ril-caf/librilutils/proto/sap-api.pb.h
./out/target/product/bacon/gen/SHARED_LIBRARIES/librilutils_intermediates/proto/hardware/ril-caf/librilutils/proto/sap-api.pb.h
then I notice the #include path is a bit different from the real path, I open the error .h file and change hardware/ril/... to hardware/ril-caf/... in these two files:
hardware/ril-caf/libril/rilSocketQueue.h
hardware/ril-caf/libril/RilSapSocket.h
Then, the build passed.
Hope this help.
I am try to build android apps but while creating apps my build failed with following errors.
D:\ibm\AnywhereWorkManager\build.xml:87: The following error occurred
while executing this line:
D:\ibm\AnywhereWorkManager\anywhere-apps-builder.xml:720: The
following error occurred while executing this line:
D:\ibm\AnywhereWorkManager\anywhere-apps-builder.xml:716: Failed
building application:
com.worklight.builder.exception.WorklightBuildException:
java.io.IOException: Unable to delete directory
D:\ibm\AnywhereWorkManager\apps\WorkApproval\android\native\assets\www\default\dojo\cldr\nls\zh-hans-mo.
at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
I know this answer might seem obvious, but if you have any of the files mentioned in the failure (D:\ibm\AnywhereWorkManager\apps\WorkApproval\android\native\assets\www\default\dojo\cldr\nls\zh-hans-mo)
open ( commandline, eclipse, other editor), this will cause the issue.
I use ant to unzip an apk file, but it occurred an error like this:
<unzip src="test.apk" dest="testdir" >
error message:
java.lang.RuntimeException: data starting at 0 is in unknown format
i googled it, and add attribute encoding="native-encoding" , it still error.
great thanks for any help!
ok,finally I wrote a custom ant task using java ziputil to unzip an apk files. It does work well.