Rebuild .aidl file failed - android

I download the latest Android Studio, open my existing project then I changed one of the data type in a method's argument of my .aidl file.
I clean and rebuild the project like 20 times now, and still I cannot rebuild .aidl and keep throwing:
Error:Execution failed for task ':playscreen_lib:compileReleaseAidl'.
java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing process C:\Users\ELDORA\AppData\Local\Android\Sdk\build-tools\25.0.0\aidl.exe with arguments {-pC:\Users\ELDORA\AppData\Local\Android\Sdk\platforms\android-25\framework.aidl -oC:\Users\ELDORA\Documents\Projects\Git\playscreen-v.4\playscreen_lib\build\generated\source\aidl\release -IC:\Users\ELDORA\Documents\Projects\Git\playscreen-v.4\playscreen_lib\src\main\aidl -IC:\Users\ELDORA\Documents\Projects\Git\playscreen-v.4\playscreen_lib\src\release\aidl -IC:\Users\ELDORA.android\build-cache\4492d2ed88e39db806ead472857b23dd46473c28\output\aidl -IC:\Users\ELDORA.android\build-cache\3503095fd81bf51424a6fea93fe733665b5c415d\output\aidl -IC:\Users\ELDORA.android\build-cache\99cfcf1b0afa3f6f8a1f5d9370f6652fdb2c5389\output\aidl -IC:\Users\ELDORA.android\build-cache\d1ed5c0d7925ed8a6207daac53ed47479f327d99\output\aidl -IC:\Users\ELDORA.android\build-cache\b9622378266364961621530394898c10ca07e005\output\aidl -IC:\Users\ELDORA.android\build-cache\ca13b86cac67c820cfadd74657b557d7be41708b\output\aidl -IC:\Users\ELDORA.android\build-cache\1f1034b41fe39b7f222731a1eca43fe985a0c5bf\output\aidl -IC:\Users\ELDORA.android\build-cache\20197f9cb41b0dcfa24d2af19b2f08410bafad05\output\aidl -IC:\Users\ELDORA.android\build-cache\8054d2ad3e9d7b18475122292b9a71c4fd97ce5d\output\aidl -dC:\Users\ELDORA\AppData\Local\Temp\aidl6443722849833229853.d C:\Users\ELDORA\Documents\Projects\Git\playscreen-v.4\playscreen_lib\src\main\aidl\com\playscreen\library\IPlayscreenAPI.aidl}
I never experience this before, it used to be one rebuilt and dependency problem upon changed .aidl will resolves.
Any idea?
Thanks.

I just found the answer, I guess I can't use java object such as Long as method argument, I changed back to long and all fine.
I don't know why but they let me pass String object but not Long. :P

Related

Custom Task in Gradle (Android)

(gradle newbie question)
I am looking to run a custom task with code from this thread. This is to do with setting up build env for release/debug etc...
Since the code bloats the original boilerplate code, I would like to do following for readability and extensibility -
Move the code to separate file as a task/def(Gist of the Code
Run the task/def before assembleDebug/Release
Here are problems I face when task is appended at the end of build.gradle file:
a) If I run just the task ./gradlew buildCustom , I get error
Could not find method defaultConfig() for arguments
b) If I try to use doLast I get error
Could not find method doLast() for arguments [task ':app:assembleDebug'] on task ':app:buildCustom'.
There is something very obvious that I donot understand, appreciate any help.

Error building openframeworks for android: “ invalid use of incomplete type ‘class Poco::Path’”

I am trying to build an android application with OF. The application runs in two other computers. However, it does not work on mine. I am using a mac.
I run the command "make AndroidDebug" in the project folder, and this is the error I have:
/Library/openFrameworks/addons/ofxHTTP/libs/ofxHTTP/src/PostRouteFileHandler.cpp:98:46: error: invalid use of incomplete type 'class Poco::Path'
ss << Poco::Path(formFileName).getExtension();
I have installed poco, but nothing changes afterwards.
What can I do to solve this?
Thanks
Have you included Poco/Path.h?
A forward declaration might appeared earlier (possibly in another header) without complete definition.

How can I work with the settings app of aosp?

I just started working on android open source project and I am trying to modify the settings application but when I am importing it with android studio and trying to compile I get this error
Error:Execution failed for task ':app:mergeDebugResources'.
/app/src/main/res/values-nl/strings.xml: Error: Found item String/sdcard_unmount more than one time
Seems like there are multiple statements of string such as
<string name="sdcard_format" product="nosdcard" msgid="6285310523155166716">"USB-opslag wissen"</string>
<string name="sdcard_format" product="default" msgid="6713185532039187532">"SD-kaart wissen"</string>
It is causing errors, how can it be fixed?
For anyone looking for answers, this other one in SO is much better: Error:Error: Found item String/photoPickerNotFoundText more than one time
you need to change the package name, because u r installing setting app on device which already have the setting app with same package name. you have to import the code modify it and then copy the new src and res directory in to aosp and create the image of android.

Issue with projectfolder called (AndroidProjects)?

I have a wired issue. If i set up a folder called AndroidProjects and put my project in there... Android-Studio fails with gradle.
one error is:
IllegalStateException:
PsiFile not parsed for file D:/AndroidProjects/MyApplication/settings.gradle.
Wait until onPsiFileAvailable() is called.
sometimes it says that gradle has a fatal error....
if i set up my projectlocation to e.g. andropro everyting is working fine.
My thoughts:
may problems with 2 big letters in projectfoldername
may foldername is to long
may android or project are registered words in android-studio
Is there a knowen issue using foldernames like i did above?
couldn't find anything on the net.

Android: Gradle Error in Android Studio

I recently added some .gifs to my /drawable so that I can use them with buttons. This worked fine (no errors). Now, when I go to rebuild/run my application, I get the following error:
Error: Gradle: Execution failed for task ':MyProject:mergeDebugResources'. > Index: 0
I'm not sure how to fix this (and there appears to be no other similar issues that I could find online.
Edit: Now it's the same error, but it also says (at the end of the first error)
Running /Applications/Android Studio.app/sdk/build-tools/android-4.2.2/aapt failed. See output
Okay, I fixed the issue. It was quite weird.
A) I had some capital letters in my res/drawables folder. Not too weird -- I can see how that would remove the first error.
B) Then, however, a lot of values in my main activity file became undefined. I had to manually import 'com.myapp.R'. Now that was weird.
Fortunately, everything is now working.
I hope that if anyone gets the same errors as me, that this response can help them.

Categories

Resources