Posts

Showing posts with the label android-studio

Module interface not updated

Module interface not updated I have a library which I use in several projects. In this library I have a function like: public boolean update(Context context, String name, UpdateResponseCallback callback) throws firstException { Now I want to change this firstException to secondException (or to the general Exception or whatever). The build of the library works okay. And also the generated files appears to be okay. When I move to the App which includes this library things go wrong. The compiler does not recognise the new/updated format. Also the quick help (mouse over) give the old interface. I have already performed CLEAN and also File:InvalideChache but nothing helps. 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.

copy file in android template changed the file content

copy file in android template changed the file content I modify the Android Studio's project-template, in the recipe.xml file, I add one line: <copy from="root/Key" to="${escapeXmlAttribute(topOut)}/Key" /> and when I create new Android project, the Key indeed was created, but actually the file was modified, and I can't use it which gave errors: java.io.IOException: Invalid keystore format at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:658) at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56) at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224) at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70) at java.security.KeyStore.load(KeyStore.java:1445) at sun.security.tools.keytool.Main.doCommands(Main.java:795) at sun.security.tools.keytool.Main.run(Main.java:343) at sun.security.tools.keytool.Main.main(Main.java:336) ...

Protecting SQL Server for Private Usage

Protecting SQL Server for Private Usage So I have an issue. I have a server, lets call it (testserver.net). Right now, to change the database, from my application, my app runs "testserver.netadd.php". The problem is anyone can run that and change things in my database. How do I make it that needs some sort of verification before running the code in add.php so no one can just have access to my server? (Like a password or something). Let your application access the add.php with some secret tokens(make it a long string). if the token is not present with the request, deny access to the script file. – Shan Jul 2 at 5:45 3 Answers 3 create a token : 1MBASFDFACAUYTUG^%(!@UUIASNSR*_-+LASQWFVSA4QWYUI12670 ,save this token safel...

Error : Ambiguous method call. Both findViewById (int) in AppCompactActivity and Activity

Image
Error : Ambiguous method call. Both findViewById (int) in AppCompactActivity and Activity I am getting the error: "Ambiguous method call" on initializing Toolbar using Android Studio 3.0 RC1. I have extended my Activity with AppCompatActivity and compiling my application using 'compileSdkVersion 26'. Attaching a screenshot of the error. 11 Answers 11 Upgrade to appcompat 27 solved this for me That's not recommended, as lint will tell you: This support library should not use a different version (27) than the compileSdkVersion (26) – paprika Nov 12 '17 at 19:11 @paprika To follow this solution, you also need to update compleSdkVersion to 27. – Code-Apprentice...

How to create new Android AAR in Android Studio

How to create new Android AAR in Android Studio I am trying to create an Andoid AAR library to contain commonly used utility functions. I followed the instructions in https://developer.android.com/studio/projects/android-library exactly. Namely: 1. File->New->New Module 2. Click "Android Library" then Next 3. Tried to use defaults: "My Library", "mylibrary" and SDK Version, but Finish button is grayed out and error message appeared: "The module location is inside Studio's install location." I see no place to enter a module's location. I've tried variations on Libray name and Module name with no joy. Am I doing something wrong? The link you provided is about creating projects as libraries modules for your main app, to generate an aar you should look something else – Marcos Vasconcelos Jun 29 at 18:03 ...

While running my Android studio project, Java compiler gives this error

While running my Android studio project, Java compiler gives this error java.lang.ClassNotFoundException: Class java.util.concurrent.Flow$Subscription not found Any Help would be appreciated, thanks !! can you post your full error code ! – kdblue 11 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.

Adding tab labels to TabView in Flutter

Adding tab labels to TabView in Flutter I'm trying to extend the TabView proposed as an answer here. Specifically, instead of the grey dots, I would like to have category labels, and load as a tab content a widget corresponding to that category. I tried following the docs, but if I change something in the AppBar it just gives me a reendering error. 2 Answers 2 You can achieve what you wanted via TabController widget. I found a simple example of TabBar here. You can achieve what you wanted via DefaultTabController widget. You can see the example here with only the icons. And here is the modified version of it with titles. TabBar part is for the tab and it's specifications. TabBarView is for the interior view. DefaultTabController TabBar TabBarView class TabBarDemo extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: DefaultTabCon...

Android Studio Failed to find target with hash string 'android-26'

Android Studio Failed to find target with hash string 'android-26' I've installed latest Android Studio and - I've created new project for sdk 25 - I have sdk 25 installed I have this issues: Error:Failed to find target with hash string 'android-26' in: C:Android Install missing platform(s) and sync project Why is it complaining about version 26? I have project with api 25 set up? I am having the exact same problem with a fresh never-before used Android Studio install; except the I have my project set up for api 16 and it is complaining about not having api 26. I also don't have Tools > Android or Tools > Android > AVD Manager in my tools menu. The whole computer is 100% fresh, nothing else ever installed on it except the JDK and Android Studio, and I am using a sample project I created by taking the "Start Project" menu and click next to all the defaults (just to test if everything was set up correctly). ...

I imported some librabries and i started gettings these errors

I imported some librabries and i started gettings these errors Below are the libraries i imported compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+' implementation 'de.hdodenhof:circleimageview:2.2.0' Start by reading the errors. – SLaks Jul 1 at 23:30 Hi there and welcome to stackoverflow, it would help if you shared the error messages you are receiving as part of your question so those who can help have more information to use. – Brandon Haugen Jul 1 at 23:34 1 Answer 1 I got your problem. You are using compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+' and impl...

zipalign.exe'' finished with non-zero exit value

zipalign.exe'' finished with non-zero exit value I'm a student programmer and I'm continuing an Android project that has been previously started by other students before me. My problem is that I'm getting an error when I try to execute the Android app inside Android Studio. You can see the error message below. The compilation must have worked for the other students since I have an apk file. What's wrong with zipalign? :app:zipalignDebug FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:zipalignDebug'. > Process 'command 'X:Sdk Android Studiobuild-tools21.1.2zipalign.exe'' finished with non-zero exit value -1073741502 My build.gradle: apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "csf.dfc.friendtracker" minSdkVersion 15 targetSdkVersion 21 ...

Emulator: Warning: Quick Boot / Snapshots not supported on this machine

Emulator: Warning: Quick Boot / Snapshots not supported on this machine I am starting to learn android but havent been able to get anywhere. I downloaded android studio as per instructions and im trying to set up an AVD. I am using a Mac Air(macOS High Sierra) with java 1.8.0_51. The moment i launch an AVD there is a warning in the event log: "Emulator: Warning: Quick Boot / Snapshots not supported on this machine. A CPU with EPT + UG features is currently needed. We will address this in a future release." The emulator just gets stuck on the loading page. So far i have tried to : 1. Reduce AVD Ram size 2. Increase AVD heap size 3. change to "software" to avoid issues if any with my graphics card 4. Install/ delete many versions of phones/api levels for avd In the Logcat logs i see the following errors: 03-09 17:27:15.544 0-1114/? I/lowmemorykiller: No kernel memory.pressure_level support (errno=2) 03-09 17:27:15.545 0-1114/? E/lowmemorykiller: Kernel does not s...

warning: quick boot/snapshots not supported on this machine

warning: quick boot/snapshots not supported on this machine I have an error when running my app using android studio, but before that it was working okay until an update(Android API27), I have tried uninstalling it but nothing,the warning am getting is; Emulator:Warning:Quick Boot/Snapshot not supported on this machine.A CPU + UG feature is currently needed. We will address this in a future release. How do i resolve this problem? 3 Answers 3 The issue might be your CPU hardware. AVD Google API levels 21+ do not run well on CPUs that do not support Extended Page Tables (EPT) and Unrestricted Guest (UG), such as Core 2 Duo. Your best option is to try a system image with AVD Google API level <= 20 on those type of CPUs. You still will see the warning but the emulator will boot up. Update: I had further issues and it seems the only way to boot to a usable system image is to go with an armeabi-v7a ver...