Error:Execution failed for task ':App:mergeDebugResources'.
> There were multiple failures while executing work items
> A failure occurred while executing com.android.build.gradle.tasks.MergeResources$FileGenerationWorkAction
> Error while processing /media/nikhilesh/App/src/main/res/drawable/ic_add_black_24dp.xml : Can't process attribute android:fillColor="@color/green": references to other resources are not supported by build-time PNG generation. See http://developer.android.com/tools/help/vector-asset-studio.html for details.
Run Code Online (Sandbox Code Playgroud)
我们怎么解决这个问题?
当我编译一个Android应用程序时(我尝试使用sdk中的示例应用程序).我收到此错误:
>Error executing aapt: Cannot run program "/home/roel/projects/sdk/build-tools/18.0.1/aapt": >error=2, No such file or directory: error=2, No such file or directory KeyChainDemo >line 1 Android ADT Problem
Run Code Online (Sandbox Code Playgroud)
但是aapt在那个地方?
>[roel@archUSB 18.0.1]$ ls /home/roel/projects/sdk/build-tools/18.0.1/
>NOTICE.txt aidl dx libLLVM.so libbcinfo.so llvm-rs-cc source.properties
>**aapt** dexdump lib libbcc.so libclang.so renderscript
Run Code Online (Sandbox Code Playgroud)
注意:我也得到错误"R无法解决",但我很确定当我解决问题1时,我也解决了这个问题
我想在移动时删除以前的折线,我正在使用 GoogleDirection 类来绘制折线。请参考下面的代码片段
GoogleDirection.withServerKey(getResources().getString(R.string.google_maps_key))
.from(origin)
.to(destination)
.transportMode(TransportMode.DRIVING)
.alternativeRoute(true)
.execute(this);
@Override
public void onDirectionSuccess(Direction direction, String rawBody) {
mMap.clear();
mMap.addMarker(new MarkerOptions().position(destination));
ArrayList<LatLng> directionPositionList = direction.getRouteList().get(0).getLegList().get(0).getDirectionPoint();
polyline = mMap.addPolyline(DirectionConverter.createPolyline(this, directionPositionList, 3, Color.BLACK));
}
@Override
public void onDirectionFailure(Throwable t) {
Log.e("Direction fail Sorry", " no route found for this location.");
Run Code Online (Sandbox Code Playgroud)
请参考截图,需要根据当前位置更新折线。