我想从我的Android应用程序中导出评分和评论.
我遵循gsutil 说明,我可以在我的电脑上安装gsutil然后我尝试导出我的评级,如跟随
gsutil cp -r gs://pubsite_prod_rev_XXXXXX/reviews/reviews_com.tupbebekailesi.serkanoral.hamilelikrehberi_2013*/Users/olkunmustafa
Run Code Online (Sandbox Code Playgroud)
然后我得到下面的错误
CommandException: Wrong number of arguments for "cp" command.
Run Code Online (Sandbox Code Playgroud)
任何帮助都会很棒.
我今天第一次尝试使用v7 21库.
我也在我的应用程序中使用FadingActionBar库.该链接到库 https://github.com/ManuelPeinado/FadingActionBar
在我习惯使用v7 21库之前,应用程序一直运行良好.但现在我收到了这个错误.
Caused by: java.lang.NullPointerException
at com.manuelpeinado.fadingactionbar.FadingActionBarHelper.setActionBarBackgroundDrawable(FadingActionBarHelper.java:48)
at com.manuelpeinado.fadingactionbar.FadingActionBarHelperBase.initActionBar(FadingActionBarHelperBase.java:173)
at com.manuelpeinado.fadingactionbar.FadingActionBarHelper.initActionBar(FadingActionBarHelper.java:31)
at olkunmustafa.example.parallax.medyasef.com.parallaxanimationexample.MyActivity.onCreate(MyActivity.java:23)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Run Code Online (Sandbox Code Playgroud)
如果我将appcompat从v21更改为v20,一切都已修复.但是我想用v21.
这是我的values/style.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="android:windowActionBarOverlay">true</item>
</style>
</resources>
Run Code Online (Sandbox Code Playgroud)
MyActivity.java
public class MyActivity extends ActionBarActivity {
@Override
protected void onCreate( Bundle savedInstanceState ) {
super.onCreate( savedInstanceState ); …Run Code Online (Sandbox Code Playgroud) 我正在开发一个基本的相机应用程序。我可以拍照,并且可以在我的应用程序中查看它。但我想在图库中异步查看我的照片。重新启动手机后,我可以在图库中看到我的照片。
示例代码。
public class PhotosActivity extends Fragment implements View.OnClickListener {
private final int REQUEST_CODE = 100;
private Button fotobutton;
private ImageView foto_image;
private static final String IMAGE_DIRECTORY_NAME = "OlkunMustafa";
public static final int MEDIA_TYPE_IMAGE = 1;
private Uri fileUri;
// Directory name to store captured images and videos
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.photos_activity,container,false);
fotobutton = (Button) rootView.findViewById(R.id.fotobutton);
foto_image = (ImageView) rootView.findViewById(R.id.foto_image);
fotobutton.setOnClickListener(this);
return rootView;
}
@Override
public void onClick(View v) { …Run Code Online (Sandbox Code Playgroud) 在Android Studio上添加Caldroid库时遇到问题.我尝试了许多不同的添加方法,但它不起作用.我使用的是Android Studio 0.8.2.
libraries.caldroid在/libraries./libraries夹中.settings.gradle
include ':app'
include 'libraries:caldroid:library'
Run Code Online (Sandbox Code Playgroud)
的build.gradle
dependencies {
compile 'com.android.support:appcompat-v7:20.+'
compile 'com.google.android.gms:play-services:4.0.30'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':libraries:caldroid:library')
}
Run Code Online (Sandbox Code Playgroud)
但我得到这个错误:
Error:Configuration with name 'default' not found.
Run Code Online (Sandbox Code Playgroud)
如何解决这个问题?
我正在使用Google Vision Api,并且我知道如何使用下面的任何图像uri发送请求。
`{
"requests":[
{
"image":{
"source":{
"imageUri":
"https://fallaviblob.blob.core.windows.net/createdblobs/20170601_191635_237.png"
}
},
"features":[
{
"type":"LABEL_DETECTION"
},
{
"type":"WEB_DETECTION"
}
]
}
]
}`
Run Code Online (Sandbox Code Playgroud)
我想通过Php客户端库使用发送请求。当我查看Google Vision文档上的示例代码时,它仅显示适用于Google Cloud Storage的远程映像的本地映像的示例。
https://cloud.google.com/vision/docs/detecting-labels#vision-label-detection-gcs-php
如您所见,我需要使用带有远程URL的Php客户端库,但是我不能。
谢谢。