I'm just now learning how to develop in Android Studio and this error come up when I began my helloworld tutorial:
Rendering Problems The following classes could not be instantiated: - android.support.design.widget.FloatingActionButton
The exception details are:
android.content.res.Resources$NotFoundException: Unable to find resource ID #0x1080029
I'm using version 23.2.0 of the Android Support Design library.
How can I get the FloatActionButton to render in the preview pane?
Look at the error stack trace generated by the previewer. It says it cannot find a drawable resource by id 0x1080029. Does a drawable exist by that ID? Are you supplying an invalid ID? On my system it appears resources start at 0x7f010000.
Also found this: Android Studio FloatingActionButton error. It says there could be a bug in version 23.2.0 of the support design lib and that downgrading to 23.1.0 fixes it.
Upgrade to Android Support Library version 23.2.1 resolves the issue. It's already available in Android Studio SDK manager.
There appears to be a bug in version 23.2.0 of the Android Support libraries; simply downgrading to 23.1.1 and rebuilding your project should make the problem disappear.
Note that the problem is not just in the Design library; also the AppCompat widgets cause problems for AppCompatButton and AppCompatImageButton also give similar errors reporting missing resources.
Related
I am looking for answers related to Autofindviews nuget and its compatibility.
As per this link [AutoFindViews Nuget] (https://www.nuget.org/packages/AutoFindViews/) under framework I could see they mentioned the product version as MonoAndroid10.
Does that mean this nuget will support for Android projects targeting till Android10?
If it supports till Android 10, I am facing an issue where it gives below error while trying to migrate the Xamarin.Android project from Android 9 to Android 10 (Where the packages are updated to AndroidX and Support widgets in layout files are changed to androidx )
Error CS0246 The type or namespace name 'Androidx' could not be found (are you missing a using directive or an assembly reference?)
Can anyone please help me understanding this? Thanks in Advance
Bro, at Google I/O 2018, the Android team announced AndroidX, but the Autofindviews nuget which is just used to replace the FindViewById method last update at the 2017. So It can't find the view in the AndroidX library.
So you can try the three solution :
Remove the reference of the Autofindviews nuget and do the FindViewById by yourself.
Have a mixed use between the Support Library and the AndroidX Library. Only use the view which belongs to the Support Library in the xml. You can also use Support Library in the Android 10.
Try to use another nuget package, such as xamarin.androidx.viewbinding.databinding 4.1.2.
I've got big old project for Android to support. It was developed under old Gradle version (2.2.3). I used to work with the latest Android Studio and now I'm trying to migrate this project to the current Gradle version (3.1.2).
I've read guide from Google on this and applied recomendations from it. I managed to fix all issues excepting two. The first one is
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
I made all replacements in my project and as I understand it's caused by a library from dependencies. OK, let's live with it. But the second issue is
error: resource android:attr/foregroundInsidePadding is private.
Message{kind=ERROR, text=error: resource
android:attr/foregroundInsidePadding is private.,
sources=[C:\Users\alexanderk.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.1.1.aar\b3fbcbe446f57e45b23f5cfcf67ccbb9\res\values\values.xml:203:5-69],
original message=, tool name=Optional.of(AAPT)}*
Google's guide says about this the following
To resolve this issue, simply replace android:foregroundInsidePadding with foregroundInsidePadding.
That's OK, I open the problem file values.xml, go to line 203 and... surprise, no foregroundInsidePadding here. Moreover, there is no this word in the whole xml. I tried invalidate Gradle cache but the issue appears again after Gradle recreates cache. And I can't ignore this since this issue stop building.
Any ideas how to solve this?
appcompat-v7-25.1.1.aar\b3fbcbe446f57e45b23f5cfcf67ccbb9\res\values\values.xml
Looks like it complains not about values.xml in your project but about one within the appcompat library. Try to bump support library version
I can't access to the feature module resources and the resources from another library which is included as an API in InstantApp. The only place where it recognises to get resources is the base feature class. I have the following sample: when I run the application there are several Fragment classes in the feature module which have to be loaded along with the layouts also located in that module, but it always fails with
Caused by: android.content.res.Resources$NotFoundException:
Tried to exclude Multi-Dexing, other modules, also disabled the aapt2, after which it has started to complain about not found views.
What could be the reason of this?
A bug is reported here.
With reference to Google issue tracker, it has been fixed with Android SDK Built-Tools to 27.0.2
Please update your Android SDK Built-Tools to 27.0.2 And ensure you are on Android Studio 3.0.1 or newer.
If any issue persists, please report at Google issue tracker they will re-open to examine.
I have an xamarin android project using mvvmcross. with version 4.0 it worked without issues. After the upgrade I'm no longer able to build and get a lot of these errors:
error CS0117: 'Resource.Styleable' does not contain a definition for 'Theme_toolbarStyle'
if it helps, here is the link to the repository: https://github.com/NPadrutt/MoneyFox.Windows/tree/xamarin
EDIT: I found that it this error seems to be linked to the mvvmcross support design package. When I deinstall it, it will build (but then I have an inflate exception..)
How can I fix that?
When adding a VectorDrawable as the src of my ImageView using the new Support Library 23.2
app:srcCompat="#drawable/ic_like"
I get the app to compile successfully and the vector drawable to show correctly. But, Android studio showing me an error saying:
Unexpected namespace prefix "app" found for tag ImageView
Any advise on how to fix it? or is it just a bug and should be ignored?
EDIT:
Forgot to mention that i have added the xmlns:app="http://schemas.android.com/apk/res-auto" declaration
Seems like it is just a lint error that can be ignored. I have updated and have the same error, but it is working correctly.
An Android Studio update will probably fix this. I am running the latest Canary build, which contains the same error currently.
It is a little worse than just an error message. In my case, it also prevents proper rendering of the image in Studio's Design mode.
Update: Fixed in Android Studio version 2.1