android-studio

How do I allow users to upload images to my app, and use them?

大兔子大兔子 提交于 2020-01-07 05:34:27
问题 I'm building an app which will allow the user to upload their own icons for use within the app (these will be small .png or .gif files). I want to include a default set of icons, and then allow the user to add their own. I'm trying to figure out the best way to do this - there seem to be various solutions online and I'm not sure which is best for my purposes. As I said, I'd like to supply a default set of icons with the app, to be stored on the user's device. The user should then be able to

Android AVDs not working with hardware acceleration

拈花ヽ惹草 提交于 2020-01-07 05:34:08
问题 4.9.0-2-amd64 #1 SMP Debian 4.9.18-1 (2017-03-30) x86_64 GNU/Linux Android Studio 2.3.3 When I try to run an AVD with hardware acceleration I get this error: emulator -avd n5 -verbose ... emulator: Initializing hardware OpenGLES emulation support libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: failed to load driver: i965 libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: failed to load driver: i965

Android Studio, NDK - Cannot Run Application

强颜欢笑 提交于 2020-01-07 04:44:13
问题 I have managed to (finally) build a test SDL2 app with Android Studio & NDK using the Gradle experimental plugin. When I try to run the project, it won't run. I get the following error: :app:compileDebugSources :app:transformClassesAndResourcesWithExtractJarsForDebug UP-TO-DATE :app:transformClassesWithDexForDebug UP-TO-DATE :app:processDebugJavaRes UP-TO-DATE :app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE :app:validateDebugSigning :app:packageDebug FAILED FAILURE: Build failed

Android Studio 3.0 canary 1 : SQL syntax error

ⅰ亾dé卋堺 提交于 2020-01-07 04:40:47
问题 I have a problem after upgraded to Android Studio 3.0 canary 1 from Android Studio 2.3 db.execSQL("CREATE TABLE IF NOT EXISTS " + Contract.COUNTRY_PATH + " (" + Contract.Country._ID + " INTEGER AUTO INCREMENT , " + Contract.Country.COLUMN_CITY_ID + " INTEGER PRIMARY KEY," + Contract.Country.COLUMN_COUNTRY_NAME + " TEXT," + Contract.Country.COLUMN_SUNRISE + " INTEGER," + Contract.Country.COLUMN_SUNSET + " INTEGER) "); It shows an error. '(',')',<column constraint> or comma expected ,got 'AUTO'

Using intent between activities, in reverse - Android

吃可爱长大的小学妹 提交于 2020-01-07 04:22:05
问题 I am quite new to android programming (aswell as java in general) and have run into an issue that has me stumped. I am building a basic app (for practice) that accesses an already built website www.shodan.io . As far as i know there is no android app for this particular site yet and i quite enjoy it for my research. So I have an app that has 4 activities, all of which load beautifully (after much help from stack forums). They are: LoadingPage, MainActivity, SearchPage, and ExploitSearch. On

How to read data from text file then overwrite it with new data?

做~自己de王妃 提交于 2020-01-07 03:53:07
问题 I'm new to android studio and I have this textview which shows the data that is stored to my text file. If I click the button, it should read the data inside the text file, add integer and the sum should replace the existing data in the text file. However when I return to the activity which show's the textView with the new data in the text file, it does not change. Here's the code for my textView txt_stars = (TextView) findViewById(R.id.txtStars); try { FileInputStream fileInputStream =

android studio app folder missing

耗尽温柔 提交于 2020-01-07 03:51:08
问题 I have created a new project in android studio and the app folder is missing. I need to resolve dependencies in build.gradle which is located inside the app folder. 回答1: You have selected multiple form factors for your app like below. That's why it's showing mobile and wear folders instead of app . So, now just double click on mobile folder you will get app level build.gradle file. Same thing for the wear folder. If you want only mobile app development then you don't have to select wear form

How to open a fragment from a fragment?

这一生的挚爱 提交于 2020-01-07 03:41:12
问题 I have made a project in which main Activity opens fragment(web.java) and I added a button in (web.java) when it clicked it should open a new fragment(next.java), but when I run app and click on button app close. MAIN ACTIVITY class public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button button1 = (Button) findViewById(R.id.button); button1

Android Studio Appcompat conflict with ActionBarSherlock [duplicate]

本秂侑毒 提交于 2020-01-07 03:25:07
问题 This question already has answers here : Already Defined Error when building with gradle (2 answers) Closed 4 years ago . i try import eclipse project to android studio and get this error Error:(1) Attribute "titleTextStyle" has already been defined Error:(1) Attribute "subtitleTextStyle" has already been defined Error:(1) Attribute "divider" has already been defined Error:(1) Attribute "background" has already been defined Error:(1) Attribute "backgroundSplit" has already been defined Error:

Android Studio WebView Youtube Video BlackScreen

Deadly 提交于 2020-01-07 03:15:48
问题 I want to play a video in the WebView but somehow I get an blackscreen on the video but I can hear the sound of it. Would be really glad if someone can help me public class MainActivity extends AppCompatActivity { WebView displayYoutubeVideo; TextView button; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); String frameVideo = "<html><body>Video From YouTube<br><iframe width=\"560\" height=\"315\" src=\