Posts

Showing posts with the label android-studio

sending a keyword to bring the location

Image
Clash Royale CLAN TAG #URR8PPP sending a keyword to bring the location hello every one **i want to send a keyword in a message that bring me the location of the reciever when the message will send i don t know how to add this option in my code ** i have my own map that i created with fragment that gives you your position this is my main activity import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.widget.EditText; import android.widget.TextView; public class Main3Activity extends AppCompatActivity { private static final String TAG = Main3Activity.class.getSimpleName(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main3); } /** * Uses an implicit intent to dial the phone with the Phone app. * Gets the phone number...

error while generating signed apk init

Image
Clash Royale CLAN TAG #URR8PPP error while generating signed apk init Hey i am trying to generate signed apk to upload to the store and i keep getting this error: Error:FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':android:lintVitalRelease'. Could not resolve all files for configuration ':android:lintClassPath'. Could not resolve com.android.tools.external.com-intellij:intellij-core:26.1.0. Required by: project :android > com.android.tools.lint:lint-gradle:26.1.0 project :android > com.android.tools.lint:lint-gradle:26.1.0 > com.android.tools.lint:lint:26.1.0 > com.android.tools.lint:lint-checks:26.1.0 project :android > com.android.tools.lint:lint-gradle:26.1.0 > com.android.tools.lint:lint:26.1.0 > com.android.tools.lint:lint-kotlin:26.1.0 project :android > com.android.tools.lint:lint-gradle:26.1.0 > com.android.tools.lint:lint:26.1.0 > com.android.tools.lint:lint-c...

Android Spinner to determine Marker Colour

Image
Clash Royale CLAN TAG #URR8PPP Android Spinner to determine Marker Colour I have a spinner which I have created for a project in Android studio. The spinner takes the following values from an array in my strings.xml file. <string-array name="activity_types"> <item>Games</item> <item>Learn</item> <item>Fitness</item> <item>Make</item> <item>Explore</item> <item>Find</item> </string-array> I would like to create a function which places a marker of a particular colour onto my map in MainActivity i.e. selecting Games, will place an orange marker on the map, when 'Games' is selected and the 'Place' button (below) is pressed. However, I am not sure how to go about this? place_btn = (Button) findViewById(R.id.place_btn); place_btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //what would handle the...

Gradle Code having Red Line Under the Code and App not Install On Virtual Or Real Device

Image
Clash Royale CLAN TAG #URR8PPP Gradle Code having Red Line Under the Code and App not Install On Virtual Or Real Device I am working on an Android App Until I face a problem that App is not able to install after the successful built and When I open my gradle file It shows a red line under the appcompat Implementation. I am confused how to resolve It since app I am not able to install app on Real Or Virtual Device. Here is Dependancies in Gradle code dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) **implementation 'com.android.support:appcompat-v7:28.0.0-beta01'** implementation 'com.android.support.constraint:constraint-layout:1.1.2' implementation 'com.google.firebase:firebase-auth:11.8.0' implementation 'com.google.firebase:firebase-database:11.8.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.sup...

Failed to resolve: com.google.firebase:firebase-core:16.0.1

Image
Clash Royale CLAN TAG #URR8PPP Failed to resolve: com.google.firebase:firebase-core:16.0.1 I'm trying to add firebase cloud storage to my app. Below is the app build.gradle. But it says: Failed to resolve: com.google.firebase:firebase-core:16.0.1. Why? There is no firebase-core in the dependencies at all. apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "com.louise.udacity.mydict" minSdkVersion 15 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com....

Andoid studio newer version installation error

Image
Clash Royale CLAN TAG #URR8PPP Andoid studio newer version installation error I was using older version of android studio and it was working in my linux 32bit system. Now when i tried to run the newer version of android studio it gives me error. Please check the image i have attached for the reference of the error. stackoverflow.com/questions/37466744/… Check this solution – Nil 2 mins ago 1 Answer 1 Because your system configuration not match with new version of Android Studio system requirement Android Studio By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to the...

Loop through List in Android Studio

Image
Clash Royale CLAN TAG #URR8PPP Loop through List<Object> in Android Studio I have a class called verse: public class Verse { String book; int chapter; int verse; String contents; } Which is populated from a database into: List<Object> list = new ArrayList<>(); List<Object> list = new ArrayList<>(); My question is how do I loop through the list and get each book, chapter and verse and contents? I've tried: for(int x=0; x < list.size(); x++) { int book = list.get(x); } But I'm unsure what .get(x) is returning, and I have a feeling it might the entire row, but I dont know how to get the data out of it. .get(x) Can anyone help? I'm very new to android studio. "I have a feeling it might the entire row". Well, if you're unsure what get(x) is returning it's unlikely any of us will know. so let's start here, why don't you print list.get(x) to the console and...

WHY - E/Volley: [40983] BasicNetwork.performRequest: Unexpected response code 400

Image
Clash Royale CLAN TAG #URR8PPP WHY - E/Volley: [40983] BasicNetwork.performRequest: Unexpected response code 400 Since a few days this mistake welcomes me again and again and I do not understand why. Besides, I don't know how to fix it either. I actually have a very simple login and registration principle in the form of an SQL database. When creating it I followed this tutorial: https://www.youtube.com/playlist?list=PLe60o7ed8E-TztoF2K3y4VdDgT6APZ0ka I used ProFreeHost instead of 000webhost. This, however, cannot be the reason. Here are the two php codes: register.php <?php $con = mysqli_connect("sql310.unaux.com", "unaux_22474806", "***my password***", "unaux_22474806_m8finder"); $firstname = $_POST["firstname"]; $lastname = $_POST["lastname"]; $email = $_POST["email"]; $phonenumber = $_POST["phonenumber"]; $username = $_POST["username"]; $password = $_POST["password"]; $statemen...

Remove Only One Item from a List (Android)

Image
Clash Royale CLAN TAG #URR8PPP Remove Only One Item from a List (Android) I have a list: (x, y, y,z) (x, y, y,z) I have another list: (x, y) (x, y) You want to remove the items from the 1st list that belong also in the 2nd list. Ex: I want the result to be (y,z) (y,z) How do I do this? EDIT: If I use removeAll. The example list returns (z) You want to remove the items from the 1st list that belong also in the 2nd list. Edit your question. – mTak 7 mins ago Does order matter? For example, if the second list was (y, x) would you want the same outcome? – Tyler V 4 mins ago The result will be (z) not (y,z) – mTak 3 mins ago ...

Class not found, Empty test suite in androidTest using Android Studio 3.0.1, Room, Kotlin

Image
Clash Royale CLAN TAG #URR8PPP Class not found, Empty test suite in androidTest using Android Studio 3.0.1, Room, Kotlin I have a problem with running my androidTest. Here is my setup in gradle: apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' android { compileSdkVersion 26 defaultConfig { applicationId "com.blabla.shoppinglistapp" minSdkVersion 17 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } ext.daggerVersion = '2.11' ext.roomVersion = '1.0.0' ext.mockitoVersion = '2.11.0' dependencies { implementation fileTree(dir: 'libs', in...

I was using Array Adapter with listview and and my app crashed on running…?

Image
Clash Royale CLAN TAG #URR8PPP I was using Array Adapter with listview and and my app crashed on running…? enter image description here MY app crashing on creating array adapter as the arraylist is showing data in logcat..... You should post your stack trace with logcat to show what the crash is. – Advice-Dog 28 secs ago By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Android: NavigationDrawer/multiple activities/same menu

Image
Clash Royale CLAN TAG #URR8PPP Android: NavigationDrawer/multiple activities/same menu What I am trying to do, is have a NavigationDrawer menu like this: NavigationDrawer I've figured out how to change layouts when menu items are clicked, but how do I load a new activity without losing the menu? My main question: For example let's say one of my menu options takes you to a layout where there are some buttons that do something. I need to load an accompanying activity/class, that will handle the actions and functionality of that specific "page" in the App. If another menu option takes you to a layout with only an image, for example, that would be another activity without all that code that handles the functionality of the buttons, since there are no buttons in this screen. I hope that makes sense! I followed many tutorials/videos online using several methods (Fragments etc.) but nothing quite answered my question. By the way, what I am doing n...

How to do FAB bottom container same this image in android?

Image
Clash Royale CLAN TAG #URR8PPP How to do FAB bottom container same this image in android? FAB bottom inset container how to do it? please By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

how to create iPhone Lockscreen Style for Android

Image
Clash Royale CLAN TAG #URR8PPP how to create iPhone Lockscreen Style for Android i want to create an app like this : www.sellmyapp(DOT)com/downloads/iphone-lockscreen-style-for-android/ its an android lockscreen for android with iphone style . any help on how can i change the lockscreen picture with java code ! thank you . 1 Answer 1 i had just find this and i dont know how to use it : www(DOT)developer(DOT)android(DOT)com/reference/android/app/WallpaperManager#FLAG_LOCK By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

How to implement Multi Dex in Instant Apps?

Image
Clash Royale CLAN TAG #URR8PPP How to implement Multi Dex in Instant Apps? I am making an instant app. I have the base feature and the installed module . The two gradle files can't have a defaultConfig{} , so that is why I have set multiDex true only in the installed build.gradle file. Running the instant app though throws a compile error as there is no multiDex anywhere. base feature installed module defaultConfig{} multiDex true build.gradle multiDex Any ideas? Thanks. 1 Answer 1 The Solution lies within making two flavours in base.gradle : base.gradle flavorDimensions 'delivery' productFlavors { instant { dimension 'delivery' minSdkVersion rootProject.minSdkInstant multiDexEnabled true } installed { dimension 'delivery' } } Note: you still have to add multiDexEnabled true in installed.gradle 's defaultConfig{} Al...

Android Studio's layout designer does not show toolbar but emulator does

Image
Clash Royale CLAN TAG #URR8PPP Android Studio's layout designer does not show toolbar but emulator does I have a problem - like title - Android Studio's activity designer does not show toolbar but the emulator (AVD) does. How can i solve the problem? Here's the ss: I don't see toolbar at activity's designer I was trying: I'm new at Android Studio so can You Guys write the solution step by step? Thank You for every help! Please edit your question with xml code – Rajshree Tiwari 5 mins ago Please check your application theme . – Mahavir Jain 1 min ago ...