I am trying to compile EmPubLite tutorials but getting an error concerning the hierarchy of WebViewFragment. Searches only come up with http://commonsware.com/Android/errata but not sure how to resolve this explanation. Many files in this package use WebViewFragment.
Any help would be appreciated.
Thanks in advance,
Terry
Fixed, changed target back to Google API's after incorrectly changing it. Had to delete InstallReceiver.java, had error "The method build() is undefined for the type NotificationCompat.Builder" line 31, on mgr.notify(NOTIFY_ID, builder.build());
Not going to worry about that for now. Any info on it would be great.
I was too focused on one error. Once Mike M. asked for more info on logcat I noticed there was an error with mixed library versions android-support-v4.jar, deleted the one in libs folder and the project compiled fine.
Related
I have a project on which I worked last year. Recently I started working on it again but wanted to update everything that was possible. I managed to resolve basically all problems except this one. I can't find anything online about this warning. I get it when I build the project. I tried downloading and using the latest tapjoy jar but it still appears. In the warning there is a path to a cache folder so I tried deleting it but id didn't change anything; maybe I'm getting this warning because those folders are missing?
The full warning is like this:
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow.","sources":[{"file":"C:\\Users\\black\\.gradle\\caches\\transforms-3\\91514d5ad9a3a762574d6c5e2880beba\\transformed\\jetified-tapjoyconnectlibrary.jar"}],"tool":"D8"}
The problem is that i have around 200 lines of this warning in console and I would like to solve them.
Has anyone seen this warning before and knows how to fix it? Obviously any help is much appreciated.
The missing folder should have nothing to do with this warning. I had this problem in the process of writing custom gradle plug-ins. It seems that ClassWriter or ClassVisitor in ASM did not implement any method, there will be this warning, but that does not affect normal functionality. You can check that your project has used those gradle plug-ins, perhaps these plug-ins are caused by the update of the problem.
I'm new to Android development. I'm having trouble importing from camera2 package.
Here is a screenshot of the failed imports. I don't understand why some of them succeeded while others not.
Really appreciate any help. Thanks in advance.
Edit:
Thanks, but I don't think it's the problem with my minSdkVersion.
The failing imports are internal to Android framework. They are not available to apps. You should be okay if you simply delete all these lines that are marked red. If your code does not compile after such cleanup, post an update with specific error messages.
I am new to Android development, and was wondering why a library like AudioManager (android.media.AudioManager) can be used, but when I try to navigate to the code of AudioManager, half the source code is red.
For example, it says,
cannot resolve symbol SystemService"
Do I need to add some kind of dependency somewhere?
This means that when I debug through AudioManager, the bytecode does not match what appears on the screen and the debug is useless.
I've tried looking at other posts and changing my SDK version to 27 and my minimum version up to 23.
Thanks in advance.
This seems to be an IDE error, typically when I am getting build errors caused by this, Invalidate Caches and Restart will fix this. You can find it by searching in the help menu or under File in Android Studio
You could try below points as it worked-out for it :
Exit Android Studio
Back up your project
Delete all the .iml files and the .idea folder
Relaunch Android Studio and reimport your project
By the way, the error messages you see in the Project Structure dialog are bogus for the most part.
try to update your Android studio, they always working for something like this. I recommend AS 3.3
Thanks to all for trying to answer. I found the answer to my question here: The import android.os.ServiceManager cannot be resolved.
Explanation:
Apparently the reason AudioManager had so many reds is because it depends on many "hidden" classes, that are purposely excluded from the .jar libraries. The #hide in https://github.com/commaai/android_frameworks_base/blob/master/media/java/android/media/IAudioService.aidl is one example.
I am using the project CSipSimple as a reference in my current project.
Project works fine until i have not tested it in the Android N.
I am getting strange errors when m running my project in Android N.
I have done some googling for that and came to know that by changing the complile SDK version for project will help me to get rid of this error but that thing wont help me in my case.
So any other workaround for this ?
It would be grateful to suggest any changes/guidelines to avoid this issue.
Thanks in advance
Before API 23, this error Text Relocations was given as warning, so it does not cause problems. From API 23 it was thrown as error. The .so file with text relocation may have memory leaks. So it must be fixed and recompiled with latest Android NDK.
Quick fix will be to set tagetApiVersion to 22 in build.gradle file.
First off I'm soooooo frustrated trying to get android.appcompat....gridlayout to work. I've followed lots of tutorials and just keep getting that horrible "android.support.v7.widget.GridLayout failed to instantiate" message. So I'm doing some serious detective work to try and understand everything about the compat libraries.
So like the title asks, what is the difference? I'm building the libs/android-...jar files, adding them to the path, following all the directions on https://developer.android.com/tools/support-library/setup.html
Any insight? Should I just uninstall eclipse and start from scratch to try and do this? I'm working with a test project and nothing is working. I keep getting 1 instantiation errors along with an error saying "a resource already exists on disk 'C:......\android-supp..-gridlayout.settings' and '....prefs'.
Please please any insight. Have spent a long time on this. Any advice is much appreciated.
they both refer to the same "v7 appcompat library" discussed at the android developer site.
You cannot just copy the jar file, as this library has resources that are referred to by your project so it needs to be added as a library project with resources as discussed here.