Android Studio with uk.co.senab.photoview.PhotoView - android

I am using Android Studio 0.8.14, and I have included the module from https://chris.banes.me/2012/10/12/photoview-v1-1/ but it always show me
Error:(27, 29) error: package uk.co.senab.photoview does not exist
But within the program the import uk.co.senab.photoview.PhotoViewAttacher; without any error.
That's puzzled me.
I have been trying to resolve this without any success.

you should check first: Package does not exist when using separate App as a dependency
then - if this does not fix your issue you should create a dependancy of your library:
reference which helped me to solve this problem:
https://www.jetbrains.com/idea/help/configuring-module-dependencies-and-libraries.html
in this case you should add : [your-photo-library-name] dependancy for your main app in Project Structure Screen.
Hope it helps.

Related

android studio errors about 'android.annotation.NonNull' in handler.java

I am using Android Studio Arctic Fox(2020.3.1).
I've been having some trouble with handler.java
Most of the errors are
'android.annotation.NonNull' is not public in 'android.annotation'. Cannot be accessed from an outside package
I've tried to fix android with androidx. but I don't know why this error occurs. please help me.
that's not important!
you will get these kinds of errors when navigating android source.
that won't affect your android project and everything will be compiled successfully ✔
I guess you need to import androidx.annotation.Nullable and make sure you have declared a dependency on androidx.annotation:annotation in your build.gradle, check here to find the last version.

cannot find symbol class DiskInfo and some other packages despite being present in SDK folder

I have an activity in which i have imported android.os.storage.DiskInfo and some other packages. Android Studio gives errors when trying to make the project saying:
error: cannot find symbol class DiskInfo
When i tried to resolve this problem i found out that all packages are present in folder $SDK-HOME\sources\android-24\android\os\storage but i don't know why Studio couldn't import them properly.
Is there anybody who have experienced problems in import and have solved it?
Thanks
p.s: i am using Android API 24
That is because of #hide in android source code. Actually Android is not allowing developers to use some classes. A solution is to use modified SDK which contains hidden classes. you can find it here https://github.com/anggrayudi/android-hidden-api
Check out : TargetSdk version and support package version.

Android - Gradle: error: package does not exist

I am trying to migrate a project that was previously developed in Eclipse over to Android Studio. The way the project was structured had caused a ton of issues when first importing. Most of those have been resolved, however there is one that persists.
The project uses zXing, which itself is a module in the project. There is no issue when referencing the module in code, autocomplete recognizes the library and features inside of it, but when Gradle tries to build I get this error:
error: package Intents does not exist
I've searched for similar scenarios but have not been able to find anything useful. This post is almost exactly what I'm dealing with. Any additional suggestions and advice would be greatly appreciated!
Looking into the build.gradle for the zXing library, changing 'minifyEnabled' from true to false seems to fix the issue.

How to add Crosswalk project to Android studio?

I am trying out android crosswalk project. I am having problems adding crosswalk webview to andriod studio though. I am not sure where I am going wrong nor do I understand most terminology yet.
I read https://crosswalk-project.org/documentation/embedding_crosswalk.html but I refers to https://developer.android.com/tools/sdk/eclipse-adt.html which is no longer supported. This seems to be outdated but I tried anyway with Android Studio 1.2.2.
I tried making a project with https://crosswalk-project.org/documentation/downloads.html Android webview (ARM) 13.42.319.11 as told in the documention. I am not sure what is meant with 'open ADT' but I assumed Android Studio instead of the plugin of eclipse. I opened from an 'existing android studio project' (the download unzipped). But didn't come across the option 'set root directory'.
I then tried to create a new android studio project and ran it. It showed the basic hello wold example on my phone. Then I followed the remaining steps by pasting in the code they provided. I ran it again and got 3 errors:
Error:(3, 22) error: package org.xwalk.core does not exist
Error:(9, 13) error: cannot find symbol class XWalkView
Error:(15, 23) error: cannot find symbol class XWalkView
I am not sure what to do from here as this is all very new to me.
Basically I am trying to run there example but can't figure out why the import isn't working.
I am having the same problem but I finally fixed it by placing the xwalk_core_library.jar in the libs folder, together with arm64-v8a and x86_64 subfolders and I have removed compile 'org.xwalk:xwalk_core_library:x.x.x.x' from dependecies.
Updated Links 19-07-2016
maven {
url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
}
And In dependencies add this
compile 'org.xwalk:xwalk_core_library_beta:9.38.208.8'

SignalR in Android Studio

I'm trying to make use of SignalR in Android Studio and while it apparently has added the projects and dependencies to my application project I'm getting constant
Error:(11, 39) error: package microsoft.aspnet.signalr.client does not exist
The import for these packages was dynamically added by Android studio as I started typing code to make use of it
Platform.loadPlatformComponent(new AndroidPlatformComponent());
So there is something there.
However when I try and actually build my main project I keep getting the package error.
I've run out of ideas now as to why it can know enough about the project to build it and reference the packages but then not actually find those packages for the main project to use.
Any ideas?
I never did find out how to do it via Android Studio. In the end I had to use Eclipse (and don't forget to change your workspace to use Java 1.6 or greater)

Categories

Resources