Xposed framework configuration problem - Xposed General

xposed framework handleLoadPackage、 initZygote method not execute.
manifest configuration :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="htt:://schemas.android.com/apk/res/android"
package="com.android.xdemo"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<!-- xposed -->
<meta-data
android:name="xposeddescription"
android:value="xposed test demo" />
<meta-data
android:name="xposedmodule"
android:value="true" />
<meta-data
android:name="xposedminversion"
android:value="54" />
<activity
android:name="com.android.xdemo.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
------------------------
xposed_init configuration :
com.android.xdemo.XDemoMain
---------------------
XDemoMain class :
package com.android.xdemo;
import java.io.File;
import android.os.Environment;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.IXposedHookZygoteInit;
import de.robv.android.xposed.callbacks.XC_LoadPackage.Lo adPackageParam;
public class XDemoMain implements IXposedHookLoadPackage, IXposedHookZygoteInit {
 @override
public void initZygote(StartupParam startupParam) throws Throwable {
try {
String sd = Environment.getExternalStorageDirectory().getAbsol utePath();
new File(sd, "test").createNewFile();
} catch (Exception e) {
}
}
 @override
public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {
try {
String sd = Environment.getExternalStorageDirectory().getAbsol utePath();
new File(sd, "demo").createNewFile();
} catch (Exception e) {
}
}
}
------------------------------------------------------
These are configured according to the official document, Xposed framework can also be installed on the phone looking for in the module is handleLoadPackage, initZygote these two methods have not been called, did not seem to come in this class, there is not a configuration mistake, please great God pointing

Related

[Q] My android studio giving me errors and not working.

READ ONLY EDIT DOWN!!
Okay, so I can't develop nothing as my Android Studio decided to. My all project is full of errors, unknown errors caused by Android Studio.
note: my files are correct, it is an other problem because even if I will import something from google codes it will have errors.
When I import a project everything's fine, but then after indexing and such things, all sudden everything is red and shouldn't be.
My errors for example are :
Code:
button1.setOnLongClickListener(new View.OnLongClickListener() {
....
....
}
Well shouldn't be error but :
Code:
cannot resolve symbol setOnLongClickListener
Another example:
Code:
button1=(Button) findViewById(R.id.button1);
I used this exact code for other button, seems right, I always using this line, it was fine until my Android Studio decided to give me some hard time, this line is full by errors and they are:
Code:
Unknown class: 'button1' , invalid method declaration; return type required, missing method body, or declare abstract
and there are like 20 errors that shouldn't be, things I tried:
1.deleting iml files , .idea folder - worked for a while but now it happened again and it doesn't fix it.
2.reinstalling android studio and then importing project.
3.upgrading android studio version to 1.3
4.restarting my pc.
5.importing project to an other pc, happened after a while.
6.Invalidate caches/ restart.
7.Changing module in project structure - I changed it back to how it was (it didn't help) and I think it caused the manifest error down..
My Module:app build.gradle:
Code:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "firstappdevelopments.david.reactiontime"
minSdkVersion 9
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.1'
}
Also I noticed now, my Manifest file as an error in
Code:
android:name=".MainActivity"
says it has no default structure. something like this. here is the full normal code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
</manifest>
Please, if someone knows what is the problem or what can I else do, just say, and I am sorry about my English, thank you all.
EDIT!!!:
I deleted this lines:
Code:
connect.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
bluetooth = BluetoothAdapter.getDefaultAdapter();
if (bluetooth != null) {
if (bluetooth.isEnabled()) {
bluetooth.startDiscovery();
Set<BluetoothDevice> bondedSet = bluetooth.getBondedDevices();
if(bondedSet.size() > 0){
for(BluetoothDevice device : bondedSet){
newDevicesListView.setVisibility(View.VISIBLE);
mArrayAdapter.add(device.getName() + "\n" + device.getAddress());
}
}else{
mArrayAdapter.add("No Devices");
}
}
} else {
textview.setText("bluetooth is disabled, enabling.");
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, RESULT_OK);
}
} else{
textview.setText("Bluetooth is not supported.");
}
}
});
AND SUDDENLY ALL THE ERRORS DISSAPPEARED , ANY IDEAS? - The errors was in other lines..

webview showing the already loaded url and not showing the presently loading URL

Hello every one,
please help me
showing the already loaded url and not showing the presently loading URL
Main activity
-------------------------
package com.example.amit.myapplication;
import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.Window;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends Activity {
private WebView mWebView;
@override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
mWebView = new WebView(this);
mWebView.loadUrl("**********");
mWebView.setWebViewClient(new WebViewClient() {
@override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});
this.setContentView(mWebView);
}
@override
public boolean onKeyDown(final int keyCode, final KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {
mWebView.goBack();
return true;
}
return super.onKeyDown(keyCode, event);
}
}
-----------------------------------------------------------------------
Activity main
-----------------
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="linknot avilible"
xmlns:tools="not available"
android:layout_width="match_parent"
android:layout_height="match_parent"
androidaddingBottom="@dimen/activity_vertical_margin"
androidaddingLeft="@dimen/activity_horizontal_margin"
androidaddingRight="@dimen/activity_horizontal_margin"
androidaddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.amit.myapplication.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!" />
<WebView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/mwebView"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
-----------------------------------------------
AndroidManifest
--------------------
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="link not avaible"
package="com.example.amit.myapplication">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
------------------
what could be the problem ?
thanks alot for answers
Can you please explain it better? What do you mean by already loaded url and by presently loading url?
Hi
Thanks for replay,
I mean after caple days the main page in app dont refresh.

App gets force closed

SplashAcvtivity.java File
Code:
package com[.]nijinsha.didyouknow;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.os.Handler;
/**
* Created by Digit on 3/17/2016.
*/
public class SplashActivity extends AppCompatActivity {
// Splash screen timer
private static int SPLASH_TIME_OUT = 3000;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
new Handler().postDelayed(new Runnable() {
/*
* Showing splash screen with a timer. This will be useful when you
* want to show case your app logo / company
*/
@Override
public void run() {
// This method will be executed once the timer is over
// Start your app main activity
Intent i = new Intent(SplashActivity.this, MainActivity.class);
startActivity(i);
// close this activity
finish();
}
}, SPLASH_TIME_OUT);
}
Manifest.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest
package="com.nijinsha.didyouknow">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true">
<activity
android:name=".SplashActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:theme="@style/Theme.AppCompat.DayNight.NoActionBar"
android:name=".MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize">
</activity>
</application>
</manifest>
LOG FILE
03-17 14:53:21.490 7053-7053/com.nijinsha.didyouknow E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.nijinsha.didyouknow, PID: 7053
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.nijinsha.didyouknow/com.nijinsha.didyouknow.SplashActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2327)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2378)
at android.app.ActivityThread.access$800(ActivityThread.java:155)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5433)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:340)
at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:309)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:273)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at com.nijinsha.didyouknow.SplashActivity.onCreate(SplashActivity.java:21)
at android.app.Activity.performCreate(Activity.java:5301)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2291)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2378)*
at android.app.ActivityThread.access$800(ActivityThread.java:155)*
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)*
at android.os.Handler.dispatchMessage(Handler.java:102)*
at android.os.Looper.loop(Looper.java:136)*
at android.app.ActivityThread.main(ActivityThread.java:5433)*
at java.lang.reflect.Method.invokeNative(Native Method)*
at java.lang.reflect.Method.invoke(Method.java:515)*
This line
Code:
at com.nijinsha.didyouknow.SplashActivity.onCreate(Sp lashActivity.java:21)
suggest that app crash in:
Code:
setContentView(R.layout.activity_splash);
Your activity extends AppCompatActivity, but in manifest You declared for this activity:
Code:
android:theme="@android:style/Theme.Black.NoTitleBar" >
You need to use another theme for this acitivty.
You must use AppCompat themes with activity that extended from AppCompatActivity class,
Code:
android:theme="@android:style/Theme.AppCompat.Light"
or don't extend your activity from AppCompatActivity.
Code:
public class SplashActivity extends Activity

app doesn't lanch; java.lang.NullPointerException

Hello,
i am trying to launch my app on a samsung galaxy s3, but the activity doesn't launch
can someone help me?
error:
06-14 08:36:58.720 24601-24601/plopmenzinc.nsapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: plopmenzinc.nsapp, PID: 24601
java.lang.RuntimeException: Unable to start activity ComponentInfo{plopmenzinc.nsapp/plopmenzinc.nsapp.Start}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2436)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2495)
at android.app.ActivityThread.access$900(ActivityThread.java:170)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1304)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5635)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at plopmenzinc.nsapp.Start.onCreate(Start.java:37)
at android.app.Activity.performCreate(Activity.java:5580)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2400)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2495)*
at android.app.ActivityThread.access$900(ActivityThread.java:170)*
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1304)*
at android.os.Handler.dispatchMessage(Handler.java:102)*
at android.os.Looper.loop(Looper.java:146)*
at android.app.ActivityThread.main(ActivityThread.java:5635)*
at java.lang.reflect.Method.invokeNative(Native Method)*
at java.lang.reflect.Method.invoke(Method.java:515)*
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)*
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)*
at dalvik.system.NativeStart.main(Native Method)*
start.java:
package plopmenzinc.nsapp;
import android.app.Activity;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.nfc.NfcAdapter;
import android.os.CountDownTimer;
import android.preference.PreferenceManager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageSwitcher;
import android.widget.TextView;
import android.widget.Toast;
public class Start extends AppCompatActivity {
int number = 0;
private ImageSwitcher sw;
public static final String MIME_TEXT_PLAIN = "text/plain";
public static final String TAG = "NfcDemo";
private TextView mTextView;
private NfcAdapter mNfcAdapter;
@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_start);
mNfcAdapter = NfcAdapter.getDefaultAdapter(this);
sw.setImageResource(R.drawable.reclame);
if (mNfcAdapter == null) {
// Stop here, we definitely need NFC
Toast.makeText(this, "U kunt deze functie helaas niet gebruiken, omdat uw toestel geen NFC heeft.", Toast.LENGTH_LONG).show();
finish();
return;
}
if (!mNfcAdapter.isEnabled()) {
mTextView.setText("Om deze functie te gebruiken moet u NFC aanzetten.");
}
handleIntent(getIntent());
}
@override
protected void onResume() {
super.onResume();
/**
* It's important, that the activity is in the foreground (resumed). Otherwise
* an IllegalStateException is thrown.
*/
setupForegroundDispatch(this, mNfcAdapter);
}
@override
protected void onPause() {
/**
* Call this before onPause, otherwise an IllegalArgumentException is thrown as well.
*/
stopForegroundDispatch(this, mNfcAdapter);
super.onPause();
}
@override
protected void onNewIntent(Intent intent) {
/**
* This method gets called, when a new Intent gets associated with the current activity instance.
* Instead of creating a new activity, onNewIntent will be called. For more information have a look
* at the documentation.
*
* In our case this method gets called, when the user attaches a Tag to the device.
*/
handleIntent(intent);
}
private void handleIntent(Intent intent) {
TextView var = (TextView) findViewById(R.id.score);
number++;
String disp = Integer.toString(number);
var.setText(disp);
final TextView CountDown = (TextView) findViewById(R.id.textView3);
new CountDownTimer(300000, 1000) {
public void onTick(long millisUntilFinished) {
CountDown.setText(millisUntilFinished / 1000 + " sec");
}
public void onFinish() {
CountDown.setText("0 sec");
}
}.start();
}
/**
* @param activity The corresponding {@link Activity} requesting the foreground dispatch.
* @param adapter The {@link NfcAdapter} used for the foreground dispatch.
*/
public void setupForegroundDispatch(final Activity activity, NfcAdapter adapter) {
final Intent intent = new Intent(activity.getApplicationContext(), activity.getClass());
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
final PendingIntent pendingIntent = PendingIntent.getActivity(activity.getApplicationContext(), 0, intent, 0);
IntentFilter[] filters = new IntentFilter[1];
String[][] techList = new String[][]{};
// Notice that this is the same filter as in our manifest.
filters[0] = new IntentFilter();
filters[0].addAction(NfcAdapter.ACTION_NDEF_DISCOVERED);
filters[0].addCategory(Intent.CATEGORY_DEFAULT);
try {
filters[0].addDataType(MIME_TEXT_PLAIN);
} catch (IntentFilter.MalformedMimeTypeException e) {
throw new RuntimeException("Check your mime type.");
}
adapter.enableForegroundDispatch(activity, pendingIntent, filters, techList);
}
public void stopForegroundDispatch(final Activity activity, NfcAdapter adapter) {
adapter.disableForegroundDispatch(activity);
}
public void image_next(){
sw.setImageResource(R.drawable.reclame);
}
public void image_prev(){
sw.setImageResource(R.drawable.reclame2);
}
}
activity:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="(link)"
xmlns:tools="(link)"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
androidrientation="vertical"
androidaddingBottom="@dimen/activity_vertical_margin"
androidaddingLeft="@dimen/activity_horizontal_margin"
androidaddingRight="@dimen/activity_horizontal_margin"
androidaddingTop="@dimen/activity_vertical_margin"
tools:context="plopmenzinc.nsapp.Start"
android:saveEnabled="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Uw aantal punten:"
android:id="@+id/textView"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="50dp"
android:singleLine="true"
android:textColor="#FF2646B0"
android:textSize="22sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/disp"
android:id="@+id/score"
android:layout_alignBottom="@+id/textView"
android:layout_toRightOf="@+id/textView"
android:layout_toEndOf="@+id/textView"
android:textSize="22sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tijd tot U weer kunt scannen:"
android:id="@+id/textView2"
android:layout_below="@+id/textView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="34dp"
android:singleLine="true"
android:textColor="#FF2646B0"
android:textSize="22sp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0 sec"
android:id="@+id/textView3"
android:singleLine="true"
android:textSize="22sp"
android:layout_alignTop="@+id/textView2"
android:layout_toRightOf="@+id/textView2"
android:layout_toEndOf="@+id/textView2" />
<ImageSwitcher
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageSwitcher"
android:layout_below="@+id/textView"
android:layout_centerHorizontal="true"
android:layout_marginTop="275dp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="prev"
android:id="@+id/button"
android:layout_alignTop="@+id/button2"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="54dp"
android:layout_marginStart="54dp"
androidnClick="image_prev" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="next"
android:id="@+id/button2"
android:layout_alignParentBottom="true"
android:layout_alignRight="@+id/textView3"
android:layout_alignEnd="@+id/textView3"
androidnClick="image_next" />
</RelativeLayout>
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="(link)"
package="plopmenzinc.nsapp">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".Start">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.NFC" />
<uses-feature
android:name="android.hardware.nfc"
android:required="true" />
<activity
android:name="net.vrallev.android.nfc.demo.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.nfc.action.TECH_DISCOVERED" />
</intent-filter>
<meta-data
android:name="android.nfc.action.TECH_DISCOVERED"
android:resource="@xml/nfc_tech_filter" />
</activity>
</manifest>
need to get this finished before thursday, so please help me
Well, thus far I see that you are making references to parts of the Layout View but I am not seeing where you are declaring your TextView / ImageView inside your XML layout, see below:
Code:
sw.setImageResource(R.drawable.reclame);
mTextView.setText("Om deze functie te gebruiken moet u NFC aanzetten.");
You need to have something like:
mTextView = (TextView)findViewbyId(R.id.TextViewId);
sw = (ImageView)findViewById(R.id.ImageViewId);
Fix those, try again and then return.

On signed bundle release the debuger adds the android studio release number in the AndroidManifest.xml file...!?

Hi together
If i create a signed bundle release, the debuger adds the android studio release number in the AndroidManifest.xml file and throws an error
i know there should not been any numbers in the package name, but why adds AS this every time?
here are the error message:
C:\Users\dev\AndroidStudioProjects\newsapp\app\build\intermediates\bundle_manifest\release\AndroidManifest.xml:2: AAPT: error: attribute 'package' in <manifest> tag is not a valid Android package name: 'com.acme.newsapp.1.4.30'.
The AndroidManifest.xml in the project folder:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.acme.newsapp">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@Mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@Mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activ..
The build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.4.30'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
In the debug version this doesnt happen, only on the signed release
my Android Studio Version is the 4.1.2
Anyone a idea why this happens?

Categories

Resources