草庐IT

return_here

全部标签

android - HERE Maps Android 集成,MISSING_LIBRARIES 错误

我按照步骤https://developer.here.com/mobile-sdks/documentation/android/topics/app-simple-android-studio.html但我收到错误消息:无法初始化mapfragmentMISSING_LIBRARIESmap初始化代码:mapFragment.init(newOnEngineInitListener(){@OverridepublicvoidonEngineInitializationCompleted(OnEngineInitListener.Errorerror){if(error==OnEng

android - 房间错误 : The columns returned by the query does not have the fields fieldname

这是一个示例POJOpublicclassProduct{privatelongid;privateStringname;privatedoubleprice;...constructorforallfields...gettersandsetters}现在,如果我有这样的查询,在我的productDAO中@Query(selectid,namefromproducts)LiveData>getProducts()我收到如下错误:Thecolumnsreturnedbythequerydoesnothavethefields[price]in...Producteventhoughth

java - 安卓地理编码器 : search by zip code returns unexpected results

我想通过Android的GeoCoder类搜索用户输入的文本。这是我的代码:GeocoderiGeocoder=newGeocoder(getContext(),Locale.GERMAN);publicAddressgetAdress(StringaUserInput){ListtAddressList=iGeocoder.getFromLocationName(aUserInput,1000,47.060940,8.564278,51.526396,13.736392);if(tAddressList!=null&&tAddressList.size()>0){for(Addres

android - 使用消息 "method not allowed here"改造响应代码 405

我正在使用改造,我有一个帖子请求interfaceNetworkApi{@Headers("Content-Type:application/json")@POST("/")funstartLoginRequest(@BodyloginModel:LoginModel):CallclassFactory{varretrofit=Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory.create()).build()companionobject{fungetApi():NetworkA

android - 为什么安卓:layout_gravity ="right" not working here in android xml

我的ListView行的xml代码是我希望ID为btn_delete的最后一个按钮保持右对齐。并在设计时按照我想要的“图形布局”显示。但是当我运行它时,在模拟器上它不起作用。查看输出:那么为什么删除按钮没有右对齐? 最佳答案 使用这个,使用相对布局 关于android-为什么安卓:layout_gravity="right"notworkinghereinandroidxml,我们在StackOverflow上找到一个类似的问题: https://stacko

java - 带有 ProgressDialog 的外部 AsyncTask 类 [更新 : and returning back?]

**更新:(见下文)**我已经四处寻找了几天,但找不到直接的答案。有人说有可能,有人说可以,有人说不可能。我对此感到疯狂。我想要的只是让AsyncTaskTask显示一个外部类的进度条。为此,我将传递上下文,正如您在主类中看到的那样。但无论我尝试什么,我都会得到NullPointerException。工作代码示例表示赞赏。谢谢顺便说一句,使用Android2.2。主要内容:importandroid.app.Activity;importandroid.os.Bundle;publicclassAsyncDemoextendsActivity{@Overridepublicvoido

android - Android Studio 2.3.1 错误:(155) Original attribute defined here,

依赖关系{编译文件树(dir:'libs',include:['*.jar'])compile'com.android.support:design:25.3.1'compile'com.android.support:appcompat-v7:25.3.1'compile'com.android.support:support-v4:25.3.1'compile'com.android.support:preference-v7:25.3.1'compile'com.google.code.findbugs:jsr305:3.0.0'compile'com.squareup.okht

MediaMetadataRetriever : return null value 的 Android 问题

尝试使用MediaMetadataRetriever检索mp3信息(专辑名称,...)。在模拟器中它工作正常。在我的设备上,大多数方法返回null。MediaMetadataRetrievermmr=newMediaMetadataRetriever();mmr.setDataSource(歌曲路径);StringalbumName=mmr.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ALBUM);Stringmp3Title=mmr.extractMetadata(MediaMetadataRetriever.METADAT

安卓 : In Lollipop sms intent not return to app

我正在使用此代码在我的Android应用程序中打开SMSIntent。但是在发送SMS之后它不会返回到Lollipop设备中的应用程序,而它在较低版本中工作正常(在JellyBeans上测试)。StringsentSMS="xxxxxxxx"StringcellNumber="xxxxx"sentSMSId=generateId();IntentsendIntent=newIntent(Intent.ACTION_SENDTO);sendIntent.setData(Uri.parse("sms:"+cellNumber));sendIntent.putExtra("sms_body"

java - 即使没有其他代码分支,我的 "return"语句也不起作用

我有一个尝试创建AudioRecord的方法。不同的手机支持不同的采样率、channel配置和音频格式。因此该方法尝试为它们中的每一个创建一个AudioRecord并返回第一个有效的。privateAudioRecordgetAudioRecord(){for(intrate:sampleRates){for(intaudioFormat:audioFormats){for(intchannelConfig:channelConfigs){Stringdescription=rate+"Hz,bits:"+audioFormat+",channel:"+channelConfig;Lo