草庐IT

return-by-reference

全部标签

android - Unresolved reference 'Intent' : val intent = Intent

我确信有一些显而易见的事情,但还没有找到解决这个简单问题的方法。错误是在用户猜出正确答案时尝试启动另一个Activity的主要Activity:Error:(85,23)Unresolvedreference:Intent代码来自“KotlinDevelopmentforAndroid”一书中的High/LowAndroid应用程序。valintent=Intent("com.example.user.highlow2.CorrectGuessActivity")startActivity(intent)list具有以下用于调用Activity的Intent过滤器:

Android 操作栏搜索 : How to filter a list by the property of a list item?

我有一个带有列表项的ListView,其中有几个TextView和一个复选框。使用操作栏搜索,我需要按TextView值过滤掉列表。这是我需要按“优先级”过滤的列表。这是我用来过滤数据采纳者列表的方法。@OverridepublicbooleanonCreateOptionsMenu(Menumenu){MenuInflaterinflater=getMenuInflater();inflater.inflate(R.menu.main,menu);SearchManagersearchManager=(SearchManager)getSystemService(Context.SE

android - undefined reference 错误,无法创建共享库

尝试了很多方法来解决问题,但没有运气。这是我的Android.mk:LOCAL_PATH:=$(callmy-dir)include$(CLEAR_VARS)LOCAL_MODULE:=avcodecLOCAL_SRC_FILES:=libavcodec.ainclude$(PREBUILT_STATIC_LIBRARY)include$(CLEAR_VARS)LOCAL_MODULE:=avutilLOCAL_SRC_FILES:=libavutil.ainclude$(PREBUILT_STATIC_LIBRARY)include$(CLEAR_VARS)LOCAL_MODULE:

安卓 : Zoom by center pinch

所以,我有用于TicTacToe游戏的ScrollView、HorizantalScrollView和BoardView。当用户缩放时,虽然我通过ScalegestureDetector将缩放比例重新绘制到单元格类别中,但缩放捏点分配在屏幕左侧的顶部,而不是捏点的中心,我如何将其分配到中心?这是我在github中的项目:https://github.com/boyfox/TestTicTac.git项目使用com.android.support:appcompat-v7谁有办法解决这个问题? 最佳答案 我认为您将希望转向更接近And

android - 即使添加到 gradle 后仍 Unresolved reference

我正在解决对这三个类的引用:木材泄漏金丝雀找到导航Controller我在我的gradle中添加了这些依赖项,我在其他项目中也有这些依赖项,但我在这里面临问题。我尝试过:清理、重建、依赖构建、构建必要删除了.gradle、.idea、build、app/build文件夹并重建应用程序,但问题仍然存在我也试过无效缓存并重新启动它也没有帮助Gradle文件:applyplugin:'com.android.application'applyplugin:'com.google.gms.oss.licenses.plugin'applyplugin:'androidx.navigation.

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

android - 库 com.google.android.gms :play-services-basement is being requested by various other libraries at [[15. 0.1,15.0.1]],但解析为 16.0.1

同步项目时出现此错误:Thelibrarycom.google.android.gms:play-services-basementisbeingrequestedbyvariousotherlibrariesat[[15.0.1,15.0.1]],butresolvesto16.0.1.Disablethepluginandcheckyourdependenciestreeusing./gradlew:app:dependencies.这是我的build.gradle项目文件://Top-levelbuildfilewhereyoucanaddconfigurationoptions

Android-Studio编译不过提示caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed t错

1.遇到的问题Causedby:org.gradle.api.internal.plugins.PluginApplicationException:Failedtoapplyplugin[id‘com.android.internal.application’]2.尝试方法 根据搜索在GradleScripts的gradle.properties中添加以下语句 android.overridePathCheck=true但是问题没有得到解决,搜索了很多方法不行,最后想到是不是Android-studio版本太高问题,我用的是2023.2.3版本,根据下载代码的时间降到2021.2.1版本问题

android - 如何在我的应用程序中嵌入 google turn by turn 导航?

我正在构建一个Android应用程序,帮助用户在两点之间导航。这是doc的链接.这正是我想要提供给用户的功能,但是我希望导航在我的应用程序中进行,而不是通过以这种方式启动IntentUrigmmIntentUri=Uri.parse("google.navigation:q=Taronga+Zoo,+Sydney+Australia");IntentmapIntent=newIntent(Intent.ACTION_VIEW,gmmIntentUri);mapIntent.setPackage("com.google.android.apps.maps");startActivity(

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