android-studio

Android Studio doesn't see ArrayList class

吃可爱长大的小学妹 提交于 2020-01-13 03:56:50
问题 Android Studio 0.5.1 doesn't see ArrayList class. Quick Definition suggest me create a new one. Even when I try to import java.util.ArrayList; It works only if I set import java.util.*; , but Quick Definition still doesn't see. import android.app.Activity; import android.os.Bundle; import java.util.*; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ArrayList

Android Studio doesn't find com.android.support:support-v4:19.1.0

限于喜欢 提交于 2020-01-13 03:48:04
问题 I have imported one project into Android Studio but I got the error: Could not find com.android.support:support-v4:19.1.0. Where could I find this file? I have imported the project using Gradle . I have the Android Studio version 0.5.7 the last android sdk and java 1.7u55 . 回答1: Just add this code to you build.gradle file dependencies { compile 'com.android.support:support-v4:19.+' } and press Tools -> Android -> Sync Project with Gradle Files Gradle will download necessary files by himself

Adding external .jar to androidstudio project

徘徊边缘 提交于 2020-01-13 03:44:28
问题 I've added the external library bsh-2.0b4.jar to an android project in android-studio by going into Project structure -> Modules -> myProject -> Tab-Dependencies -> + Sign and then add the .jar file. I also tried to copy the file into the /libs directory and then rightclick in studio and add as library... (both methods independently!!). I inserted the following code as a test import bsh.Interpreter; ... Interpreter interpreter = new Interpreter(); interpreter.eval("result = (7+21*6)/(32-27)")

Fix “Ignoring InnerClasses attribute” warning

被刻印的时光 ゝ 提交于 2020-01-12 18:28:50
问题 I would like to fix this warning that give me each build this output: Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(com.sun.jna.Native$1) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type

Fix “Ignoring InnerClasses attribute” warning

时光总嘲笑我的痴心妄想 提交于 2020-01-12 18:27:48
问题 I would like to fix this warning that give me each build this output: Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(com.sun.jna.Native$1) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type

Error while waiting for device: The emulator process for AVD … was killed

本秂侑毒 提交于 2020-01-12 18:23:01
问题 I am a freshman for the development of the Andriod, I suffered from a odd question when I runned the app ,just as the follow picture. I also google it, but I have not finded a useful answer, who can tell me what I can do ~~~~(>_<)~~~~ thanks 回答1: I found this: just go to this directory: cd $ANDROID_HOME/Sdk/emulator/lib64/libstdc++ and rename: libstdc++.so.6 to libstdc++.so.6.bak $ANDROID_HOME is your android SDK directory source: https://forum.manjaro.org/t/android-studio-installation-guide

Error while waiting for device: The emulator process for AVD … was killed

杀马特。学长 韩版系。学妹 提交于 2020-01-12 18:22:12
问题 I am a freshman for the development of the Andriod, I suffered from a odd question when I runned the app ,just as the follow picture. I also google it, but I have not finded a useful answer, who can tell me what I can do ~~~~(>_<)~~~~ thanks 回答1: I found this: just go to this directory: cd $ANDROID_HOME/Sdk/emulator/lib64/libstdc++ and rename: libstdc++.so.6 to libstdc++.so.6.bak $ANDROID_HOME is your android SDK directory source: https://forum.manjaro.org/t/android-studio-installation-guide

Emulator: emulator: WARNING: UpdateCheck: Failure: Error

倾然丶 夕夏残阳落幕 提交于 2020-01-12 17:21:10
问题 I was able to run the my AVD shown below successfully. avd However after a couple of API updates and update of the Android Studio to 3.0, I'm unable to run the AVD successfully again. Keep getting the error below: avd error My AVD is also super slow and i am running a windows PC with 8GB RAM. Below is the details of my avd. Name: Pixel_API_25 CPU/ABI: Google APIs Intel Atom (x86) Path: C:\Users\Blah\.android\avd\Pixel_API_25.avd Target: google_apis [Google APIs] (API level 25) Skin: pixel SD

Does an Android Library need a manifest ,app_name,Icon?

此生再无相见时 提交于 2020-01-12 11:58:19
问题 I have an android Library that outputs an aar library. This library will be built into different projectFlavors of Mobile, TV and Wear apps. I think that each of these platforms' should be the ones that set variables like the app name, icon, and permissions through the manifest and productflavors. Is there any way to build an AAR without requiring an AndroidManifest.xml and therefore drawables(for the icon)? More information about what I'm doing can be found at my last question on the subject

Does an Android Library need a manifest ,app_name,Icon?

强颜欢笑 提交于 2020-01-12 11:58:08
问题 I have an android Library that outputs an aar library. This library will be built into different projectFlavors of Mobile, TV and Wear apps. I think that each of these platforms' should be the ones that set variables like the app name, icon, and permissions through the manifest and productflavors. Is there any way to build an AAR without requiring an AndroidManifest.xml and therefore drawables(for the icon)? More information about what I'm doing can be found at my last question on the subject