[Q] SDK 4 Home Screen Widget - No Activity Found! - Android Q&A, Help & Troubleshooting

I am new to Android SDK,but I know JAVA a little.I am on SDK v4.The problem is that,I tried to make 'HelloWidget' Home Screen Widget (with just a text box),and when I try to run the project,the console gives me
Code:
No Launcher Activity Found!
The application will only sync the package to the device!
And my app is nowhere to be found in the AVD.I had tried putting the .MAIN and Launcher in Intent filter,but no good.Here are my files:
AndroidManifest.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="removed due to newbies are not allowed to post links"
package="ax.startup"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<!-- Broadcast Receiver that will process AppWidget updates -->
<receiver android:name=".AxStartup" android:label="AxStartup">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="@layout/startup_info" />
</receiver>
</application>
</manifest>
main.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="removed"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<EditText
android:id="@+id/txt1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="HELLO WORLD"
/>
</LinearLayout>
startup_info.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="removed"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<EditText
android:id="@+id/txt1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine"
android:text="ITS WORKING DUDE!"
android:minWidth="146dip"
android:minHeight="72dip"
android:updatePeriodMillis="10000"
android:initialLayout="@layout/startup_info">
<requestFocus />
</EditText>
</LinearLayout>
Java file
Code:
package ax.startup;
import android.appwidget.AppWidgetProvider;
public class AxStartup extends AppWidgetProvider {
}
I followed the tutorial from helloandroid website.
And another strange problem is that when I long press on desktop,only options to change wallpaper is coming.There is no 'Add to Home Screen' or 'Widgets' or any other menu!!!

Related

[Q] ADW Theme - Help...

Alright so to start off i have eclipse, the android sdk, and all that other good stuff setup properly.
Now the problem is i keep getting an error in the androidmanifest.xml saying
<uses-sdk android:minSdkVersion="4"/>
The error message when clicked upon is, <uses-sdk> tag appears after <application> tag.
I have tried multiple versions of the sdk build including 2.2 (as the guide suggest) and changing the minimum sdk requirement but i always seem to run into this exact same problem. Any ideas? Oh and also im using this template
AnderWeb-ADW.Theme-Template-d8491c4
Heres the entire AndroidManifest.xml...
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="Red.Glow.Adw"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="internalOnly">
<application android:label="@string/theme_title" android:icon="@drawable/theme_icon">
<activity android:name=".main"
android:label="@string/theme_title">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="org.adw.launcher.THEMES" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="org.adw.launcher.icons.ACTION_PICK_ICON" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="red.glow.adw.docks"
android:label="@string/theme_title"
android:icon="@drawable/theme_icon">
<intent-filter>
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
</activity>
<provider android:name="red.glow.adw.docksProvider" android:authorities="red.glow.adw.docksProvider" />
</application>
<uses-sdk android:minSdkVersion="4"/>
</manifest>
Ehh figured it out.. AnderWeb's template build was throwing me up a ton of errors but kaydensigh's template works great.

[TUTORIAL] GB/ICS How To Create New Theme & Convert Default Themes App To Normal App

[TUTORIAL] GB/ICS How To Create New Theme & Convert Default Themes App To Normal App
Sorry My Bad English
Apktool Tutorial
http://forum.xda-developers.com/showthread.php?t=2011254
Notepad Plus
http://notepad-plus-plus.org/download
Tutorial Create New Theme
Download test_theme.apk
decomplie test_theme to Apktool
Go to projects test_theme.apk folder Open Android Manifest.xml to notepad Plus
Code:
[/<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="2000" android:versionName="1.0" package="com.[COLOR="Red"]orochi_2013_tonypanduru_fish[/COLOR].themes"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="10" />
<application android:label="[COLOR="red"]Fish By Orochi[/COLOR]" android:icon="@drawable/icon">
<uses-library android:name="com.sonyericsson.privateapis_1p" />
<service android:label="@string/orochi_theme_title" android:name=".orochiThemeService">
<intent-filter>
<action android:name="com.sonyericsson.theme.RuntimeThemeService" />
</intent-filter>
<meta-data android:name="com.sonyericsson.service.theme" android:resource="@xml/orochi_themeinfo" />
</service>
</application>
</manifest>
Edit red Sections
Sample
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="2000" android:versionName="1.0" package="com.xperia_2011.themes"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="10" />
<application android:label="xperia 2011 By Orochi" android:icon="@drawable/icon">
<uses-library android:name="com.sonyericsson.privateapis_1p" />
<service android:label="@string/orochi_theme_title" android:name=".orochiThemeService">
<intent-filter>
<action android:name="com.sonyericsson.theme.RuntimeThemeService" />
</intent-filter>
<meta-data android:name="com.sonyericsson.service.theme" android:resource="@xml/orochi_themeinfo" />
</service>
</application>
</manifest>
And Save Androidmanifest.xml
Go to projects test_theme.apk/smali/com Folder Rename orochi_2013_tonypanduru_fish folder to xperia_2011
go to projetcs test_theme.apk/smali\com\xperia_2011\themes open orochiThemeService.smali to notepad plus
edit First Line
Code:
[COLOR="red"].class public Lcom/orochi_2013_tonypanduru_fish/themes/orochiThemeService;[/COLOR]
to
Code:
[COLOR="red"].class public Lcom/xperia_2011/themes/orochiThemeService;[/COLOR]
save files
Go to test_theme.apk/res/values folder string.xml open notepad plus edit Theme Name
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">[COLOR="red"]Fish[/COLOR]</string>
<string name="orochi_theme_title">[COLOR="red"]Fish[/COLOR]</string>
</resources>
to
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Xperia 2011</string>
<string name="orochi_theme_title">Xperia 2011 </string>
</resources>
Go to projects test_theme.apk/res drawable-mdpi and drawable-land-mdpi Change All İmg
and Finish open APKTOOL Set 14 Create+Sign New App Created Signed_test_theme.apk :good:
Tutorial Convert Defaultthemes App to Normal install App
DefaultThemes.apk Decomplie to Apktool
go to projects DefaultThemes.apk folder Open Android Manifest.xml note pad plus
orginal Android Manifest.xml
Code:
[COLOR="Red"]<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="2000" android:versionName="2.0" package="com.sonyericsson.defaultruntimethemes"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="10" />
<application>
<uses-library android:name="com.sonyericsson.privateapis_1p" />[/COLOR]
<service android:label="@string/green_theme_title" android:name=".GreenThemeService">
<intent-filter>
<action android:name="com.sonyericsson.theme.RuntimeThemeService" />
</intent-filter>
<meta-data android:name="com.sonyericsson.service.theme" android:resource="@xml/green_themeinfo" />
</service>
<service android:label="@string/black_theme_title" android:name=".BlackThemeService">
<intent-filter>
<action android:name="com.sonyericsson.theme.RuntimeThemeService" />
</intent-filter>
<meta-data android:name="com.sonyericsson.service.theme" android:resource="@xml/black_themeinfo" />
</service>
<service android:label="@string/orange_theme_title" android:name=".OrangeThemeService">
<intent-filter>
<action android:name="com.sonyericsson.theme.RuntimeThemeService" />
</intent-filter>
<meta-data android:name="com.sonyericsson.service.theme" android:resource="@xml/orange_themeinfo" />
</service>
<service android:label="@string/blue_theme_title" android:name=".BlueThemeService">
<intent-filter>
<action android:name="com.sonyericsson.theme.RuntimeThemeService" />
</intent-filter>
<meta-data android:name="com.sonyericsson.service.theme" android:resource="@xml/blue_themeinfo" />
</service>
<service android:label="@string/pink_theme_title" android:name=".PinkThemeService">
<intent-filter>
<action android:name="com.sonyericsson.theme.RuntimeThemeService" />
</intent-filter>
<meta-data android:name="com.sonyericsson.service.theme" android:resource="@xml/pink_themeinfo" />
</service>
<service android:label="@string/rainbow_theme_title" android:name=".RainbowThemeService">
<intent-filter>
<action android:name="com.sonyericsson.theme.RuntimeThemeService" />
</intent-filter>
<meta-data android:name="com.sonyericsson.service.theme" android:resource="@xml/rainbow_themeinfo" />
</service>
<service android:label="@string/red_theme_title" android:name=".RedThemeService">
<intent-filter>
<action android:name="com.sonyericsson.theme.RuntimeThemeService" />
</intent-filter>
<meta-data android:name="com.sonyericsson.service.theme" android:resource="@xml/red_themeinfo" />
</service>
</application>
</manifest>
delete red section
Copy New text save xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="2000" android:versionName="1.0" package="com.new.defaultruntimethemes"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="10" />
<application android:label="new Themes" android:icon="@drawable/icon">
<uses-library android:name="com.sonyericsson.privateapis_1p" />
go to DefaultThemes.apk folder res/values/strings.xml Edit Theme Name
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="black_theme_title">[COLOR="Red"]Silk[/COLOR]</string>
<string name="blue_theme_title">[COLOR="red"]Sapphire[/COLOR]</string>
<string name="green_theme_title">[COLOR="red"]Emerald[/COLOR]</string>
<string name="orange_theme_title">[COLOR="red"]Gold[/COLOR]</string>
<string name="pink_theme_title">[COLOR="red"]Ametyhst[/COLOR]</string>
<string name="rainbow_theme_title">[COLOR="red"]Turquiose[/COLOR]</string>
<string name="red_theme_title">[COLOR="red"]Ruby[/COLOR]</string>
</resources>
go to DefaultThemes.apk folder res/values/public.xml add new drawable code
Code:
[COLOR="red"]<public type="drawable" name="icon" id="0x7f020028" />[/COLOR]
Download icon.png Copy projetcs DefaultThemes.apk\res\drawable-mdpi folder or Add your İcon 48x48 or 72x72 png Format İmg
goto projetcs DefaultThemes.apk/smali/com Folder Rename to sonyericsson folder (new)
Go to DefaultThemes.apk/smali/com/new/defaultruntimethemes edit 7 smali files change First line
blackThemeService.smali
blueThemeService.smali
greenThemeService.smali
orangeThemeService.smali
redThemeService.smali
rainbowThemeService.smali
pinkThemeService.smali
Sample
Code:
.class public Lcom/[COLOR="red"]sonyericsson[/COLOR]/defaultruntimethemes/BlackThemeService;
to
Code:
.class public Lcom/[COLOR="red"]new[/COLOR]/defaultruntimethemes/BlackThemeService;
Edit 7 Smali File And
DefaultThemes.apk\res\drawable-mdpi + DefaultThemes.apk\res\drawable-land-mdpi folder Change All İmage
Finish open Apktool Set 14 ( Recomplie+Sign ) new app Created signed_DefaultThemes.apk rename new app install
Thanks again
Great work man,
will try.
Nice tutorial my friend
saqib nazm said:
Nice tutorial my friend [/QUOTE
:good: thanks bro
Click to expand...
Click to collapse
great
great work my friend :good:
Need root?
Scythemore said:
Need root?
Click to expand...
Click to collapse
No Root Acces :good:
Orochixxx said:
No Root Acces :good:
Click to expand...
Click to collapse
i always wondered how do this....but i know now....
btw nice tut

[Q] Missing Adactivity error message

Hi i'm very new at this so please bare with me, successfully made my first decompilation with apk tool and after modifying and and recompiling the apk on the bottom of the apk where the ad banner should be there is a message that reads: "Missing AdActivity with android:configChanges in AndroidManifest.xml."
This is what my Android Manifest looks like :
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="7" android:versionName="@string/version" package="com.tt.radio"
xmlns:android="schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACTION_HEADSET_PLUG" />
<application android:theme="@style/AppTheme" android:label="@string/app_name" android:icon="@drawable/icon" android:allowBackup="true">
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<activity android:theme="@*android:style/Theme.Black.NoTitleBar" android:label="@string/app_name" android:name="com.tt.radio.SplashActivity" android:screenOrientation="portrait" android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:theme="@*android:style/Theme.Black.NoTitleBar" android:label="@string/app_name" android:name="com.tt.radio.MainActivity" android:launchMode="singleInstance" android:screenOrientation="portrait" android:configChanges="keyboardHidden|orientation" />
<service android:name="com.tt.radio.AudioSignal" android:enabled="true" />
<activity android:theme="@*android:style/Theme.Black.NoTitleBar" android:name="com.tt.radio.FbActivity" android:configChanges="keyboardHidden|orientation" />
<activity android:theme="@*android:style/Theme.Black.NoTitleBar" android:name="com.tt.radio.TwActivity" android:configChanges="keyboardHidden|orientation" />
<activity android:theme="@*android:style/Theme.Black.NoTitleBar" android:name="com.tt.radio.AboutActivity" android:configChanges="keyboardHidden|orientation" />
<activity android:theme="@*android:style/Theme.Black.NoTitleBar" android:name="com.tt.radio.back" />
<activity android:name="com.google.android.gms.ads.AdActivity" android:screenOrientation="portrait" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode" />
</application>
</manifest>
Any help would be much appreciated.
Duneglow
No one can help me with this?
Hi there ! I have the same issue as well. Are you managed to solve that problem so far ?
Sent from my LG-LS980 using XDA Free mobile app

[SOLVED][Debug Help] Empty/White Activity (invisible UI controls)

Hello! I generated a very simple 2 activities app using Google's Android Studio, and the target is an Android 8.1 phone. The problem is that the main activity doesn't show the edit box and buttons (that are obviously visible in the Design page). If I start my login activity (in the onCreate() function of the main activity), the login activity UI is visible and the main activity UI is still not visible. If I single step debug the app, the main activity UI seems present (as no error is encountered). They are just invisible. I compared the XML of both activities, and couldn't find a different setting that would fix this problem.
PS: I could't find a solution in Google search either.
PS: I added a space to break the URL links below.
AndroidManifest.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http: //schemas.android.com/apk/res/android"
package="com.example.test2">
<application
android:allowBackup="true"
android:allowTaskReparenting="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="false"
android:theme="@style/AppTheme">
<activity
android:alwaysRetainTaskState="false"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:alwaysRetainTaskState="false"
android:label="@string/app_name"
android:name=".LoginActivity"
android:parentActivityName=".MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.test2.MainActivity" />
</activity>
</application>
</manifest>
activity_main.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http: //schemas.android.com/apk/res/android"
xmlns:app="http: //schemas.android.com/apk/res-auto"
xmlns:tools="http: //schemas.android.com/tools"
android:id="@+id/containerMain"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:paddingEnd="16dp"
android:paddingBottom="16dp"
android:visibility="visible"
tools:context=".MainActivity">
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayout"
android:layout_width="0dp"
android:layout_height="46dp"
android:layout_marginStart="16dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="8dp"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent">
<android.support.design.widget.TextInputEditText
android:id="@+id/textName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/TextNameHint"
android:visibility="visible" />
</android.support.design.widget.TextInputLayout>
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="8dp"
android:clickable="true"
android:enabled="true"
android:focusable="true"
android:longClickable="false"
android:onClick="buttonClick"
android:text="@string/Button"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent" />
</android.support.constraint.ConstraintLayout>
MainActivity.java
Code:
package com.example.test2;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.ToggleButton;
public class MainActivity extends AppCompatActivity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
Thanks in advance!
[SOLVED] [Debug Help] Empty/White Activity (invisible UI controls)
Even though the design view seemed fine to me, including constraints and all, something was off to make the UI controls invisible. To try to isolate the problen, I decided to delete the controls one by one, and then I started to see something.
So, I made a different UI design. :cyclops:

Help Modify settings.apk MIUI 8 6.9.29

help, I want to disable or hide the button light switch option. is it possible to do that in modifying settings.apk on miui 8. Thanks
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/key_settings"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<PreferenceCategory android:title="@string/screen_key_press" android:key="screen_key_press">
<ListPreference android:entries="@arRay/screen_key_press_action" android:title="@string/app_switch_key" android:key="menu_press" android:dialogTitle="@string/screen_key_press_action" android:entryValues="@arRay/screen_key_press_action_value" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/screen_key_long_press" android:key="screen_key_long_press">
<ListPreference android:entries="@arRay/screen_key_long_press_action" android:title="@string/app_switch_key" android:key="menu_long_press" android:dialogTitle="@string/screen_key_long_press_action" android:entryValues="@arRay/screen_key_long_press_action_value" />
<ListPreference android:entries="@arRay/screen_key_long_press_action" android:title="@string/home_key" android:key="home_long_press" android:dialogTitle="@string/screen_key_long_press_action" android:entryValues="@arRay/screen_key_long_press_action_value" />
<ListPreference android:entries="@arRay/screen_key_long_press_action" android:title="@string/back_key" android:key="back_long_press" android:dialogTitle="@string/screen_key_long_press_action" android:entryValues="@arRay/screen_key_long_press_action_value" />
<ListPreference android:entries="@arRay/screen_key_long_press_timeout" android:title="@string/screen_key_long_press_timeout" android:key="screen_key_long_press_timeout" android:dialogTitle="@string/screen_key_long_press_timeout" android:entryValues="@arRay/screen_key_long_press_timeout_value" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/under_keyguard" android:key="under_keyguard">
<CheckBoxPreference android:title="@string/disable_power_key_long_press_under_keyguard" android:key="disable_power_long_press" />
<CheckBoxPreference android:title="@string/pref_volume_wake_title" android:key="pref_volume_wake" android:summary="@string/pref_volume_wake_summary" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/convenience_key_category_title" android:key="convenience_key">
<CheckBoxPreference android:title="@string/fp_nav_center_back_to_home_title" android:key="pref_fingerprint_nav_center_to_home" />
</PreferenceCategory>
<CheckBoxPreference android:title="@string/pref_button_light" android:key="pref_button_light" android:summary="@string/pref_button_light_summary" />
<ListPreference androidersistent="false" android:entries="@arRay/button_light_timeout_entries" android:title="@string/button_light_timeout" android:key="button_light_timeout" android:dependency="pref_button_light" android:dialogTitle="@string/button_light_timeout" android:entryValues="@arRay/button_light_timeout_value" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/status_bar_screen_button_key" android:key="screen_button_category">
<Preference android:title="@string/status_bar_key_position_custom" android:key="screen_button_custom" android:fragment="com.android.settings.screenkey.ScreenKeySettings" />
</PreferenceCategory>
</PreferenceScreen>
I already decompiled the settings.apk and found the xml file key_settings.xml. im wondering which string on the xml file i will delete or modify to disable the menu for button light switch option.

Categories

Resources