I was suffering form this over couple weeks, and it is killing me.
I am working on an android project in Android studio. I imported Haibison lockpattern as module to this projects.
in "settings.gradle" i add
include ':androidlockpattern'
in "build.gradle" i add
dependencies {
compile project(':androidlockpattern')
...
}
When I run the project, which print errors
"Error: package Haibison.android.lockpattern.util" does not exist.
I checked thousands times, the package is just right there, and when I import the package in my code:
import haibison.android.lockpattern.LockPatternActivity;
import haibison.android.lockpattern.util.AlpSettings
It just looks fine...
Plz help.
Try using this in your gradle project:
compile 'haibison.android:underdogs:+
Hope this helps!
Related
I have this gradle java project with this setting.gradle
pluginManagement {
repositories {
maven {
url "${settings.ext.get("artifactory.contextUrl")}/example"
credentials {
username = 'myemail'
password = 'mypassword'
}
}
}
When i import it into IDEA, everything works fine, but i want to import this project into VS Code, but when i try it, gradle build passed just like in IDEA, but it still shows many errors:
error
and java dont see imports imports
obviously it shouldn't be problem with project and config, but with vs code, cause like i said, IDEA import it normally, does any have idea?
I tried turn on nested projects in vs code gradle, but without change, really don't know where could be difference between IDEA and VSCODE gradle.
Install the Gradle for Java extension. Check to see if all dependencies are included.
For more information on using gradle in vscode see here.
I am trying to setup the apk expansion setup. I added the SampleDownloaderActivity.java but I am getting these errors once I rebuild the project
import com.google.android.vending.expansion.zipfile.ZipResourceFile; does not exist
import com.google.android.vending.expansion.zipfile.ZipResourceFile.ZipEntryRO; does not exist
What is the alternative to correct this?
you have to include the expansion library separately as the code dependency, you can get the relevant code at location <sdk>/extras/google/google_market_apk_expansion/zip_file/
I'm trying to port Apache Flink to Android. One of the biggest problem is that some java tools doesn't exist for Android, but these conflict are not detected at compile time and the errors (NoClassDefFoundError excpetion) are detected only at runtime.
For example, Java's ManagementFactory doesn't exists for android, BUT no compile error is thrown even if in this class there are unresolved symbols/libraries, in particular:
import javax.management.MBeanServer;
import java.lang.management.BufferPoolMXBean;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryPoolMXBean;
import java.lang.management.MemoryType;
import java.lang.management.MemoryUsage;
Now, I included the Flink's jars (flink-clients, flink-java, flink-runtime and flink-streaming) in my Android Studio project and I would like to search all these kind of unresolved dependencies to avoid these kind of exception at runtime. There is any Android Studio tool for this purpose?
I think including jar dependencies in the project will not make Android Studio and a compiler to search for missing classes in already built jars. Try to include src of flink into your project. I tried that and I had all unresolved imports being red.
I'm trying to add the JCodec library to my android studio project. I followed the steps listed here. I import these four lines:
import org.jcodec.codecs.h264.H264Decoder;
import org.jcodec.common.AndroidUtil;
import org.jcodec.common.model.ColorSpace;
import org.jcodec.common.model.Picture;
I get no errors until I build my project. When I build the project, I get an error that each of the packages I tried to import don't exist. Does anyone know what the problem is?
Thanks!
I did not really understand how linked answer helped you to add library because it is for Eclipse and you are using Android Studio and Gradle.
In build.gradle you should add:
dependencies {
...
compile 'org.jcodec:jcodec:0.1.9'
...
}
I figured out my problem. The issue was that I added the library under libraries but it wasn't a jar file, it was an android project. What I did to solve the problem was adding it as a module and then adding the module as a dependency to my project.
I downloaded and compiled JTransforms-3.0 into my project and I can see it in the hierarchy here:
I'm running into issues on when I try to import it.
import edu.emory.mathcs.jtransforms.fft.DoubleFFT_1D;
It says it cannot resolve the symbol "edu" and I can get an error saying that the package doesn't exist. I'm using android studio and I have the libraries in my gradle file under the dependencies. Can anyone help? Thanks.
I don't know if you solve the problem still but I had to go through the same path as well. I ended up going to the Jtransform's GitHub page and downloading the "JTransforms-3.1-with-dependencies.jar" file. Placing it in the "libs" folder, right click "Add as a library" and works perfectly! :)
JTransform's github page
It should be imported like this:
dependencies {
...
implementation 'com.github.wendykierp:JTransforms:3.1'
}